ypsman.systemd_mounts
systemd montuje
Ustaw montowanie jako usługę systemd.
Ten plik Playbook tworzy usługę systemd do montowania udostępnień.
Dzięki temu możesz używać montowania jako usługi systemowej.
Działa dla debiana stretch i jessie, jeśli używasz systemd.
Na przykład:
systemctl status mount-point.mount
systemctl start mount-point.mount
systemctl stop mount-point.mount
Opcje:
Appdir: # opis usługi
share: //apps.local/apps$ # udostępnienie do zamontowania
mount: /opt/app # folder do zamontowania
type: nfs # typ montowania (patrz strona man dla polecenia mount)
options: uid=1000 # opcje, nazwa użytkownika...
automount: false # Jeśli false: usługa zamontuje przy starcie
# Jeśli true: zamontuje, gdy nastąpi dostęp do folderu i przy starcie
Przykładowy plik Playbook
- hosts: all
roles:
- role: systemd-mounts
mounts:
myLogDir:
share: //logserver.local/logs$
mount: /mnt/logs
type: cifs
options: domain=local,username=user,password=password,uid=1000,gid=1000
automount: true
Appdir:
share: //apps.local/apps$
mount: /opt/app
type: nfs
options: uid=1000
automount: false