Owncloud AutoFS role

certbot_on_virtu
Alexandre Iooss 2020-04-11 14:44:35 +02:00
parent 416d0c3c45
commit 7e736b0e19
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
3 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
- name: Restart autofs service
service:
name: autofs
state: restarted

View File

@ -0,0 +1,41 @@
---
- name: Install autofs and bindfs
apt:
update_cache: true
name:
- autofs
- bindfs
register: apt_result
retries: 3
until: apt_result is succeeded
#- name: Configure autofs deamon
# template:
# src: "{{ item }}.j2"
# dest: "/etc/{{ item }}"
# mode: 0644
# loop:
# - default/autofs
# - auto.master
# notify: Restart autofs service
#- name: Configure home-adh autofs
# template:
# src: "auto.master.d/{{ item.0 }}.j2"
# dest: "/etc/auto.master.d/{{ item.0 }}"
# mode: "{{ item.1 }}"
# loop:
# - ["home-adh.autofs", "0644"]
# - ["home-adh.sh", "0755"]
# notify: Restart autofs service
- name: Install autoclean cron
template:
src: cron.d/owncloud-clean-autofs.j2
dest: /etc/cron.d/owncloud-clean-autofs
- name: Start autofs service
systemd:
name: autofs
enabled: true
state: started

View File

@ -0,0 +1,2 @@
# {{ ansible_managed }}
*/15 * * * * root /bin/ls -l /home-owncloud/ 2>/dev/null | /bin/grep d????????? | /usr/bin/awk '{print $7}' | /usr/bin/xargs -I '@LOGIN@' /bin/umount /home-owncloud/@LOGIN@