From 44b32f0d099d130f9e5691d049740b117334c5cb Mon Sep 17 00:00:00 2001 From: binary Date: Mon, 15 Mar 2021 20:27:24 +0100 Subject: Ensure passed directory exists on nfs server. --- roles/nfsclient/tasks/main.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'roles/nfsclient/tasks') diff --git a/roles/nfsclient/tasks/main.yml b/roles/nfsclient/tasks/main.yml index f84c926..fe5a0f5 100644 --- a/roles/nfsclient/tasks/main.yml +++ b/roles/nfsclient/tasks/main.yml @@ -22,12 +22,29 @@ include_tasks: "_{{ ansible_distribution | lower }}.yml" ignore_errors: true +- name: ensure directory exists on remote server + file: + path: "{{ nfsclient_server_dir }}" + owner: "0" + group: "0" + mode: "755" + state: directory + delegate_to: "{{ nfsclient_server.ansible_host }}" + +- name: ensure directory exists on local machine + file: + path: "{{ nfsclient_dir }}" + owner: "0" + group: "0" + mode: "755" + state: directory + - name: ensure tmp directory exists for testing nfsd file: path: "{{ nfsclient_test_dir }}" - owner: 0 - group: 0 - mode: 0700 + owner: "0" + group: "0" + mode: "0700" state: directory - name: test nfs setup -- cgit v1.2.3