2 Commits

Author SHA1 Message Date
56f18119b3 Mountoption sauber. 2025-08-22 14:20:23 +02:00
30ea8282fb noatime in fstab. 2025-08-19 10:02:00 +02:00
8 changed files with 31 additions and 17 deletions

2
.gitignore vendored
View File

@@ -1,2 +1,2 @@
test test
roles/initnextcloud/files/resources/.netrc

View File

@@ -1,6 +1,6 @@
--- ---
- hosts: "{{ target }}" - hosts: "{{ target }}"
gather_facts: false gather_facts: true
remote_user: pi remote_user: pi
roles: roles:
- initnextcloud - initnextcloud

View File

@@ -0,0 +1,4 @@
set number
set ff=unix
set nocompatible
syntax on

View File

@@ -18,7 +18,7 @@
- name: Run docker-compose up - name: Run docker-compose up
community.docker.docker_compose: community.docker.docker_compose:
project_src: '{{dockerdir }}/compose/nextcloud' project_src: '{{dockerdir }}/nextcloud'
state: present state: present
become: true become: true

View File

@@ -1,12 +1,11 @@
- include_vars: "roles/initnextcloud/vars/dirs.yml" - include_vars: "roles/initnextcloud/vars/dirs.yml"
- include_vars: "roles/initnextcloud/vars/partuuid.yml" - include_vars: "roles/initnextcloud/vars/partuuid.yml"
- include_vars: "roles/initnextcloud/vars/pckg.yml" - include_vars: "roles/initnextcloud/vars/pckg.yml"
- include_tasks: ../subtasks/upgrade.yml
- import_tasks: install.yml - import_tasks: install.yml
- import_tasks: optional.yml
- import_tasks: mount.yml - import_tasks: mount.yml
- import_tasks: dirs.yml - import_tasks: dirs.yml
- import_tasks: docker.yml - import_tasks: docker.yml
- import_tasks: optional.yml

View File

@@ -1,16 +1,28 @@
- name: Add Nextcloud mount to fstab - name: create mount dir
become: true become: true
ansible.builtin.blockinfile: file:
path: /etc/fstab path: "/mnt/nextcloud"
marker: "# {mark} ANSIBLE MANAGED BLOCK nextcloud" state: directory
block: |
PARTUUID={{ partuuid }} /mnt/nextcloud ext4 defaults,fail 0 1
- 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 become: true
ansible.posix.mount: ansible.posix.mount:
path: /mnt/nextcloud path: /mnt/nextcloud
src: "PARTUUID={{ partuuid }}"
fstype: "ext4"
opts: "defaults,noatime"
state: mounted state: mounted
fstype: ext4
src: PARTUUID={{ partuuid }} - name: Facts aktualisieren
setup:
filter: ansible_mounts

View File

@@ -1,11 +1,9 @@
dockerrepo: "https://git.olli-cloud.de/olli/dockercmd" dockerrepo: "https://raspithekgit.srv64.de/raspithek/docker"
dockerdir: "/home/pi/git/dockercmd" dockerdir: "/home/pi/git/dockercmd"
volumedirs: volumedirs:
- /mnt/nextcloud - /mnt/nextcloud
- /opt/clamav - /opt/clamav
- /opt/grafana
- /opt/influxdb
homedirs: homedirs:
- bin - bin

View File

@@ -1 +1,2 @@
partuuid: "011ad286-01" partuuid: "011ad286-01"
mark: "---"