diff options
author | binary <me@rgoncalves.se> | 2021-03-15 20:27:24 +0100 |
---|---|---|
committer | binary <me@rgoncalves.se> | 2021-03-15 20:27:24 +0100 |
commit | 44b32f0d099d130f9e5691d049740b117334c5cb (patch) | |
tree | ece6cc667d726eb69cfd05cf1f3321c44e357b95 | |
parent | c4f1db12ef9fa635bc62d437715e763b3cef312a (diff) | |
download | infrastructure-44b32f0d099d130f9e5691d049740b117334c5cb.tar.gz |
Ensure passed directory exists on nfs server.
-rw-r--r-- | roles/nfsclient/tasks/main.yml | 23 |
1 files changed, 20 insertions, 3 deletions
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 |