Simplify directory creation

This commit is contained in:
Sam A. 2023-01-25 22:35:38 +01:00
parent 4b46ec15ea
commit c1608dd5f4
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -1,19 +1,26 @@
# vim: ft=yaml.ansible # vim: ft=yaml.ansible
--- ---
- name: Create Nextcloud volume directories - name: Create Nextcloud apache2 directory
file: file:
name: "{{ services.nextcloud.volume }}/{{ dir.name }}" name: "{{ services.nextcloud.volume }}/apache2"
owner: "{{ dir.owner | default('root') }}" owner: root
mode: "{{ dir.mode | default('u=rwx,g=rx,o=rx') }}" mode: u=rwx,g=rx,o=rx
state: directory state: directory
loop:
- name: apache2 - name: Create Nextcloud app directory
- name: app file:
- name: postgres name: "{{ services.nextcloud.volume }}/app"
owner: root
group: '33'
mode: u=rwx,g=rx,o=rx
state: directory
- name: Create Nextcloud PostgreSQL directory
file:
name: "{{ services.nextcloud.volume }}/postgres"
owner: '70' owner: '70'
mode: u=rwx,go= mode: u=rwx,go=
loop_control: state: directory
loop_var: dir
- name: Copy Apache2 config files - name: Copy Apache2 config files
copy: copy: