summaryrefslogtreecommitdiffstats
path: root/roles/nfsserver/tasks/stunnel.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/nfsserver/tasks/stunnel.yml')
-rw-r--r--roles/nfsserver/tasks/stunnel.yml36
1 files changed, 36 insertions, 0 deletions
diff --git a/roles/nfsserver/tasks/stunnel.yml b/roles/nfsserver/tasks/stunnel.yml
new file mode 100644
index 0000000..4f1b56c
--- /dev/null
+++ b/roles/nfsserver/tasks/stunnel.yml
@@ -0,0 +1,36 @@
+- name: Installation config stunnel
+ template:
+ src: "nfsd.conf.j2"
+ dest: "/etc/stunnel/nfsd.conf"
+ mode: 0644
+
+- name: Installation du service systemd
+ copy:
+ src: "stunnel-nfsd@.service"
+ dest: "/etc/systemd/system/"
+ owner: root
+ group: root
+ mode: 0644
+ notify: reload systemd
+
+- name: Installation du socket systemd
+ template:
+ src: "stunnel-nfsd.socket.j2"
+ dest: "/etc/systemd/system/stunnel-nfsd.socket"
+ mode: 0644
+ notify:
+ - reload systemd
+ - launch nfsd socket
+
+- name: Création du répertoire du chroot
+ file:
+ path: /var/stunnel/chroot/etc
+ state: directory
+
+- name: Création des fichiers du chroot
+ file:
+ path: "/var/stunnel/chroot/etc/{{ item }}"
+ state: touch
+ loop:
+ - hosts.allow
+ - hosts.deny