aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-12-21 17:42:23 +0000
committerRomain Gonçalves <me@rgoncalves.se>2021-12-21 17:51:50 +0000
commita4c3a63cbdb9fde03e827f1b583e6131faba5bc4 (patch)
tree216316fe918544a57d5d65e2b6039eb485058ccf
parent84aa6a0ad17aa8517c1429272cf4c6fcaed9bfbb (diff)
downloadrules-a4c3a63cbdb9fde03e827f1b583e6131faba5bc4.tar.gz
roles/nfsclient: Pass ansible-lint
posix.mount should be used and tested when possible
-rw-r--r--roles/nfsclient/handlers/main.yml3
-rw-r--r--roles/nfsclient/tasks/main.yml5
2 files changed, 4 insertions, 4 deletions
diff --git a/roles/nfsclient/handlers/main.yml b/roles/nfsclient/handlers/main.yml
new file mode 100644
index 0000000..e6bc07e
--- /dev/null
+++ b/roles/nfsclient/handlers/main.yml
@@ -0,0 +1,3 @@
+- name: reload fstab # noqa: command-instead-of-module ignore-errors
+ command: mount -a
+ ignore_errors: true
diff --git a/roles/nfsclient/tasks/main.yml b/roles/nfsclient/tasks/main.yml
index 7799a60..0c1f75e 100644
--- a/roles/nfsclient/tasks/main.yml
+++ b/roles/nfsclient/tasks/main.yml
@@ -26,7 +26,4 @@
lineinfile:
path: "{{ nfsclient_fstab_path }}"
line: "{{ nfsclient_server_ip }}:{{ nfsclient_server_dir }}/{{ inventory_hostname }} {{ nfsclient_dir }} nfs rw,nodev,nosuid 0 0"
-
-- name: reload fstab
- shell: mount -a
- ignore_errors: true
+ notify: reload fstab
remember that computers suck.