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
---
- name: Create Nextcloud volume directories
- name: Create Nextcloud apache2 directory
file:
name: "{{ services.nextcloud.volume }}/{{ dir.name }}"
owner: "{{ dir.owner | default('root') }}"
mode: "{{ dir.mode | default('u=rwx,g=rx,o=rx') }}"
name: "{{ services.nextcloud.volume }}/apache2"
owner: root
mode: u=rwx,g=rx,o=rx
state: directory
loop:
- name: apache2
- name: app
- name: postgres
- name: Create Nextcloud app directory
file:
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'
mode: u=rwx,go=
loop_control:
loop_var: dir
state: directory
- name: Copy Apache2 config files
copy: