7 changed files with 30 additions and 16 deletions
@ -1,2 +1,2 @@ |
|||
test |
|||
|
|||
roles/initnextcloud/files/resources/.netrc |
|||
|
@ -0,0 +1,4 @@ |
|||
set number |
|||
set ff=unix |
|||
set nocompatible |
|||
syntax on |
@ -1,12 +1,11 @@ |
|||
- include_vars: "roles/initnextcloud/vars/dirs.yml" |
|||
- include_vars: "roles/initnextcloud/vars/partuuid.yml" |
|||
- include_vars: "roles/initnextcloud/vars/pckg.yml" |
|||
- include_tasks: ../subtasks/upgrade.yml |
|||
- import_tasks: install.yml |
|||
- import_tasks: optional.yml |
|||
- import_tasks: mount.yml |
|||
- import_tasks: dirs.yml |
|||
- import_tasks: docker.yml |
|||
- import_tasks: optional.yml |
|||
|
|||
|
|||
|
|||
|
@ -1,16 +1,28 @@ |
|||
- name: Add Nextcloud mount to fstab |
|||
- name: create mount dir |
|||
become: true |
|||
ansible.builtin.blockinfile: |
|||
path: /etc/fstab |
|||
marker: "# {mark} ANSIBLE MANAGED BLOCK nextcloud" |
|||
block: | |
|||
PARTUUID={{ partuuid }} /mnt/nextcloud ext4 defaults,noatime,fail 0 1 |
|||
file: |
|||
path: "/mnt/nextcloud" |
|||
state: directory |
|||
|
|||
- name: Mount /mnt/nextcloud |
|||
- name: Backup der /etc/fstab anlegen |
|||
become: true |
|||
ansible.builtin.copy: |
|||
src: /etc/fstab |
|||
dest: /etc/fstab.backup.{{ ansible_date_time.iso8601 }} |
|||
remote_src: yes |
|||
mode: '0644' |
|||
|
|||
|
|||
- name: Ensure /mnt/nextcloud is mounted and in fstab |
|||
become: true |
|||
ansible.posix.mount: |
|||
path: /mnt/nextcloud |
|||
src: "PARTUUID={{ partuuid }}" |
|||
fstype: "ext4" |
|||
opts: "defaults,noatime" |
|||
state: mounted |
|||
fstype: ext4 |
|||
src: PARTUUID={{ partuuid }} |
|||
|
|||
- name: Facts aktualisieren |
|||
setup: |
|||
filter: ansible_mounts |
|||
|
|||
|
@ -1 +1,2 @@ |
|||
partuuid: "011ad286-01" |
|||
mark: "---" |
|||
|
Loading…
Reference in new issue