Use a loop to create directories

This commit is contained in:
Sam A. 2023-04-21 00:57:06 +02:00
parent ab32d484d2
commit 28de4b4b17
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -1,18 +1,16 @@
# vim: ft=yaml.ansible
---
- name: Create SimpleXMQ config directory
- name: Create SimpleXMQ volume directories
ansible.builtin.file:
name: "{{ services.simplexmq.volume }}/config"
owner: root
mode: u=rwx,g=rx,o=rx
state: directory
- name: Create SimpleXMQ logs directory
ansible.builtin.file:
name: "{{ services.simplexmq.volume }}/logs"
name: "{{ services.simplexmq.volume }}/{{ dir }}"
owner: root
mode: u=rwx,g=rx,o=rx
state: directory
loop:
- config
- logs
loop_control:
loop_var: dir
- name: Create Docker network for SimpleXMQ
community.docker.docker_network: