Playbook für die Nextcloud Notfalleinrichtung.
This commit is contained in:
27
roles/initnextcloud/tasks/dirs.yml
Normal file
27
roles/initnextcloud/tasks/dirs.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
- name: Abbrechen, wenn /mnt/nextcloud nicht gemountet ist
|
||||
fail:
|
||||
msg: "/mnt/nextcloud ist nicht gemountet – Playbook wird abgebrochen."
|
||||
when: "'/mnt/nextcloud' not in (ansible_mounts | map(attribute='mount') | list)"
|
||||
- name: create home dirs
|
||||
file:
|
||||
path: "~/{{ item }}"
|
||||
state: directory
|
||||
loop: "{{ homedirs }}"
|
||||
|
||||
- name: create volume dir
|
||||
become: true
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: pi
|
||||
group: pi
|
||||
mode: '0755'
|
||||
loop: "{{ volumedirs }}"
|
||||
|
||||
- name: create nextcloud dirs
|
||||
file:
|
||||
path: ~/{{ item}}
|
||||
state: directory
|
||||
loop: "{{ ncdirs }}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user