From 34bb521722b2699cd0ebbe918d1534229c8398a3 Mon Sep 17 00:00:00 2001 From: Benjamin Graillot Date: Fri, 13 Dec 2019 08:47:17 +0100 Subject: [PATCH] [zamok] Mount nfs with systemd --- roles/zamok-mount/tasks/main.yml | 13 +++++++++++++ .../templates/systemd/system/nfs-home.mount.j2 | 12 ++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 roles/zamok-mount/tasks/main.yml create mode 100644 roles/zamok-mount/templates/systemd/system/nfs-home.mount.j2 diff --git a/roles/zamok-mount/tasks/main.yml b/roles/zamok-mount/tasks/main.yml new file mode 100644 index 00000000..05cf4ada --- /dev/null +++ b/roles/zamok-mount/tasks/main.yml @@ -0,0 +1,13 @@ +--- +- name: Deploy nfs systemd mount + template: + src: systemd/system/nfs-home.mount.j2 + dest: /etc/systemd/system/nfs-home.mount + mode: 0755 + +- name: Load and activate nfs systemd mount + systemd: + name: nfs-home.mount + daemon_reload: true + enabled: true + state: started diff --git a/roles/zamok-mount/templates/systemd/system/nfs-home.mount.j2 b/roles/zamok-mount/templates/systemd/system/nfs-home.mount.j2 new file mode 100644 index 00000000..c8d98ecc --- /dev/null +++ b/roles/zamok-mount/templates/systemd/system/nfs-home.mount.j2 @@ -0,0 +1,12 @@ +# {{ ansible_managed }} +[Unit] +Description=Mount home-adh on zbee + +[Mount] +What=nfs.adm.crans.org:/home-adh +Where=/home +Type=nfs +Options=rw,nosuid + +[Install] +WantedBy=multi-user.target