Move common tasks into separate file
This commit is contained in:
parent
571e3cda62
commit
e1c8e86700
3 changed files with 17 additions and 15 deletions
14
roles/matrix/tasks/common.yml
Normal file
14
roles/matrix/tasks/common.yml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
- name: Create Matrix directories
|
||||||
|
file:
|
||||||
|
state: directory
|
||||||
|
path: '{{ item }}'
|
||||||
|
mode: 'u=rwx,g=rwx,o=rx'
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
with_items:
|
||||||
|
- '{{ matrix__conf_dir }}'
|
||||||
|
- '{{ matrix__opt_dir }}'
|
||||||
|
- '{{ matrix__lib_dir }}'
|
||||||
|
- '{{ matrix__log_dir }}'
|
||||||
|
- '{{ matrix__run_dir }}'
|
|
@ -1,4 +1,7 @@
|
||||||
---
|
---
|
||||||
|
- include_tasks: common.yml
|
||||||
|
- meta: flush_handlers
|
||||||
|
|
||||||
- include_tasks: nginx.yml
|
- include_tasks: nginx.yml
|
||||||
- meta: flush_handlers
|
- meta: flush_handlers
|
||||||
|
|
||||||
|
|
|
@ -29,21 +29,6 @@
|
||||||
create_home: false
|
create_home: false
|
||||||
notify: Load, enable and restart Matrix Synapse
|
notify: Load, enable and restart Matrix Synapse
|
||||||
|
|
||||||
- name: Create Matrix directories
|
|
||||||
file:
|
|
||||||
state: directory
|
|
||||||
path: '{{ item }}'
|
|
||||||
mode: 'u=rwx,g=rwx,o=rx'
|
|
||||||
owner: root
|
|
||||||
group: root
|
|
||||||
with_items:
|
|
||||||
- '{{ matrix__conf_dir }}'
|
|
||||||
- '{{ matrix__opt_dir }}'
|
|
||||||
- '{{ matrix__lib_dir }}'
|
|
||||||
- '{{ matrix__log_dir }}'
|
|
||||||
- '{{ matrix__run_dir }}'
|
|
||||||
notify: Load, enable and restart Matrix Synapse
|
|
||||||
|
|
||||||
- name: Create Matrix Synapse directories
|
- name: Create Matrix Synapse directories
|
||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
|
|
Reference in a new issue