Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f222459101 | |||
| 56f18119b3 | |||
| 30ea8282fb |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,2 @@
|
|||||||
test
|
test
|
||||||
|
roles/initnextcloud/files/resources/.netrc
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: "{{ target }}"
|
- hosts: "{{ target }}"
|
||||||
gather_facts: false
|
gather_facts: true
|
||||||
remote_user: pi
|
remote_user: pi
|
||||||
roles:
|
roles:
|
||||||
- initnextcloud
|
- 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
|
- 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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
7
roles/tag_demo/tasks/main.yml
Normal file
7
roles/tag_demo/tasks/main.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
- import_tasks: step1.yml
|
||||||
|
- import_tasks: step2.yml
|
||||||
|
- import_tasks: step3.yml
|
||||||
|
- import_tasks: step4.yml
|
||||||
|
tags: step4
|
||||||
|
|
||||||
4
roles/tag_demo/tasks/step1.yml
Normal file
4
roles/tag_demo/tasks/step1.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
- name: Step 1 wird ausgeführt.
|
||||||
|
debug:
|
||||||
|
msg: "Ausgabe von Step 1"
|
||||||
|
tags: step1
|
||||||
5
roles/tag_demo/tasks/step2.yml
Normal file
5
roles/tag_demo/tasks/step2.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- name: Step 2 wird ausgeführt.
|
||||||
|
debug:
|
||||||
|
msg: "Ausgabe von Step 2"
|
||||||
|
tags:
|
||||||
|
- step2
|
||||||
4
roles/tag_demo/tasks/step3.yml
Normal file
4
roles/tag_demo/tasks/step3.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
- name: Step 3 wird ausgeführt.
|
||||||
|
debug:
|
||||||
|
msg: "Ausgabe von Step 3"
|
||||||
|
tags: step3
|
||||||
3
roles/tag_demo/tasks/step4.yml
Normal file
3
roles/tag_demo/tasks/step4.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
- name: Step 4 wird ausgeführt.
|
||||||
|
debug:
|
||||||
|
msg: "Ausgabe von Step 4"
|
||||||
6
tag_demo.yml
Normal file
6
tag_demo.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
- hosts: "{{ target }}"
|
||||||
|
gather_facts: false
|
||||||
|
remote_user: pi
|
||||||
|
roles:
|
||||||
|
- tag_demo
|
||||||
|
|
||||||
Reference in New Issue
Block a user