From e9ad3174367f29b7d03dff0b991d5e36e6fc50ee Mon Sep 17 00:00:00 2001 From: vincent Date: Sun, 4 Feb 2024 21:23:17 +0100 Subject: [PATCH] feat ensure nfs share folder exist --- ansible/playbooks/nas.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ansible/playbooks/nas.yml b/ansible/playbooks/nas.yml index eeaa909..c0fc0c0 100644 --- a/ansible/playbooks/nas.yml +++ b/ansible/playbooks/nas.yml @@ -6,6 +6,13 @@ vars: # certbot_force: true pre_tasks: + - name: Ensure base NFS directory exist + ansible.builtin.file: + path: "{{ item }}" + state: directory + loop: "{{ nfs_bind_source }}" + become: true + - name: Bind NFS export ansible.posix.mount: path: "{{ nfs_bind_target }}/{{ item.split('/')[-1] }}"