dns_resolver role, update-dns script, dns-deploy playbook, inventory updates
This commit is contained in:
parent
152edb8345
commit
1509daad4c
26 changed files with 780 additions and 176 deletions
10
roles/sshfs_mount/defaults/main.yml
Normal file
10
roles/sshfs_mount/defaults/main.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
sshfs_mounts: []
|
||||
# Beispiel:
|
||||
# sshfs_mounts:
|
||||
# - src: "u457772@u457772.your-storagebox.de:immich"
|
||||
# dest: /storagebox
|
||||
# port: 23
|
||||
# identity_file: /root/.ssh/id_borg
|
||||
# uid: 1000
|
||||
# gid: 1000
|
||||
29
roles/sshfs_mount/tasks/main.yml
Normal file
29
roles/sshfs_mount/tasks/main.yml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
- name: sshfs installieren
|
||||
apt:
|
||||
name: sshfs
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
- name: Mount-Verzeichnisse anlegen
|
||||
file:
|
||||
path: "{{ item.dest }}"
|
||||
state: directory
|
||||
loop: "{{ sshfs_mounts }}"
|
||||
|
||||
- name: fstab Einträge
|
||||
lineinfile:
|
||||
path: /etc/fstab
|
||||
regexp: ".*{{ item.dest }}.*fuse.sshfs.*"
|
||||
line: "{{ item.src }} {{ item.dest }} fuse.sshfs port={{ item.port }},IdentityFile={{ item.identity_file }},uid={{ item.uid }},gid={{ item.gid }},allow_other,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,_netdev,noauto,x-systemd.automount 0 0"
|
||||
state: present
|
||||
loop: "{{ sshfs_mounts }}"
|
||||
|
||||
- name: systemd reload für automount
|
||||
systemd:
|
||||
daemon_reload: true
|
||||
|
||||
- name: Mounts aktivieren
|
||||
shell: "mountpoint -q {{ item.dest }} || mount {{ item.dest }}"
|
||||
loop: "{{ sshfs_mounts }}"
|
||||
changed_when: false
|
||||
Loading…
Add table
Add a link
Reference in a new issue