aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorbinary <me@rgoncalves.se>2021-03-15 20:27:24 +0100
committerbinary <me@rgoncalves.se>2021-03-15 20:27:24 +0100
commit44b32f0d099d130f9e5691d049740b117334c5cb (patch)
treeece6cc667d726eb69cfd05cf1f3321c44e357b95 /roles
parentc4f1db12ef9fa635bc62d437715e763b3cef312a (diff)
downloadinfrastructure-44b32f0d099d130f9e5691d049740b117334c5cb.tar.gz
Ensure passed directory exists on nfs server.
Diffstat (limited to 'roles')
-rw-r--r--roles/nfsclient/tasks/main.yml23
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
remember that computers suck.