Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
56f18119b3 | |||
30ea8282fb |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,2 @@
|
||||
test
|
||||
|
||||
roles/initnextcloud/files/resources/.netrc
|
||||
|
@@ -1,6 +1,6 @@
|
||||
---
|
||||
- hosts: "{{ target }}"
|
||||
gather_facts: false
|
||||
gather_facts: true
|
||||
remote_user: pi
|
||||
roles:
|
||||
- initnextcloud
|
||||
|
4
roles/initnextcloud/files/resources/.vimrc
Normal file
4
roles/initnextcloud/files/resources/.vimrc
Normal file
@@ -0,0 +1,4 @@
|
||||
set number
|
||||
set ff=unix
|
||||
set nocompatible
|
||||
syntax on
|
@@ -18,7 +18,7 @@
|
||||
|
||||
- name: Run docker-compose up
|
||||
community.docker.docker_compose:
|
||||
project_src: '{{dockerdir }}/compose/nextcloud'
|
||||
project_src: '{{dockerdir }}/nextcloud'
|
||||
state: present
|
||||
become: true
|
||||
|
||||
|
@@ -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,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,11 +1,9 @@
|
||||
dockerrepo: "https://git.olli-cloud.de/olli/dockercmd"
|
||||
dockerrepo: "https://raspithekgit.srv64.de/raspithek/docker"
|
||||
dockerdir: "/home/pi/git/dockercmd"
|
||||
|
||||
volumedirs:
|
||||
- /mnt/nextcloud
|
||||
- /opt/clamav
|
||||
- /opt/grafana
|
||||
- /opt/influxdb
|
||||
|
||||
homedirs:
|
||||
- bin
|
||||
|
@@ -1 +1,2 @@
|
||||
partuuid: "011ad286-01"
|
||||
mark: "---"
|
||||
|
Reference in New Issue
Block a user