31 lines
595 B
YAML
31 lines
595 B
YAML
|
---
|
||
|
- hosts: teier.eu
|
||
|
gather_facts: no
|
||
|
tasks:
|
||
|
- name: Check dc directory
|
||
|
stat:
|
||
|
path: /dc/element
|
||
|
register: element_dc_dir_stat
|
||
|
|
||
|
- name: Create element dc directory
|
||
|
file:
|
||
|
path: /dc/element
|
||
|
state: directory
|
||
|
mode: 0755
|
||
|
group: root
|
||
|
owner: root
|
||
|
when: element_dc_dir_stat.islnk is not defined
|
||
|
|
||
|
- name: Copy config
|
||
|
copy:
|
||
|
src: config.json
|
||
|
dest: /dc/element/
|
||
|
|
||
|
- name: Copy compose file
|
||
|
copy:
|
||
|
src: docker-compose.yml
|
||
|
dest: /dc/element/
|
||
|
|
||
|
- name: Start element
|
||
|
shell: "cd /dc/element && docker-compose up -d"
|
||
|
|