ypsman.systemd_cifs_mount
ansible systemd-cifs-mounts
CIFS共有をマウントするためのSystemdサービスを設定します。
このプレイブックは、CIFS共有をマウントするためのSystemdサービスを作成します。
これにより、マウントをシステムサービスとして使用できます。
Debian StretchおよびJessieで、systemdを使用している場合に動作します。
1つのサーバーから複数のフォルダーをマウントします。
例えば:
systemctl status mount-point.mount
systemctl start mount-point.mount
systemctl stop mount-point.mount
systemctl status mount-point.automount
systemctl start mount-point.automount
systemctl stop mount-point.automount
オプション:
cifs_mount_share: //apps.local/apps$ # マウント元のサーバー
cifs_mount_path: /opt/app # マウント先のフォルダー
cifs_mount_options: uid=1000 # オプション、ユーザー名など...
例のプレイブック
- hosts: all
roles:
- role: systemd-cifs-mounts
cifs_mounts:
- folder1
- folder2