Use a loop to create directories
This commit is contained in:
parent
ab32d484d2
commit
28de4b4b17
|
@ -1,18 +1,16 @@
|
||||||
# vim: ft=yaml.ansible
|
# vim: ft=yaml.ansible
|
||||||
---
|
---
|
||||||
- name: Create SimpleXMQ config directory
|
- name: Create SimpleXMQ volume directories
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
name: "{{ services.simplexmq.volume }}/config"
|
name: "{{ services.simplexmq.volume }}/{{ dir }}"
|
||||||
owner: root
|
|
||||||
mode: u=rwx,g=rx,o=rx
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: Create SimpleXMQ logs directory
|
|
||||||
ansible.builtin.file:
|
|
||||||
name: "{{ services.simplexmq.volume }}/logs"
|
|
||||||
owner: root
|
owner: root
|
||||||
mode: u=rwx,g=rx,o=rx
|
mode: u=rwx,g=rx,o=rx
|
||||||
state: directory
|
state: directory
|
||||||
|
loop:
|
||||||
|
- config
|
||||||
|
- logs
|
||||||
|
loop_control:
|
||||||
|
loop_var: dir
|
||||||
|
|
||||||
- name: Create Docker network for SimpleXMQ
|
- name: Create Docker network for SimpleXMQ
|
||||||
community.docker.docker_network:
|
community.docker.docker_network:
|
||||||
|
|
Reference in a new issue