From 8977a445bf518e8193319a9399ea5b5bb9c92f21 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Fri, 11 Mar 2016 10:43:51 -0600 Subject: [PATCH] Tweaks to fix NFS setup and handler. --- handlers/main.yml | 1 + tasks/main.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/handlers/main.yml b/handlers/main.yml index 8fed451..83b7bce 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -1,3 +1,4 @@ --- - name: restart nfs service: "name={{ nfs_server_daemon }} state=restarted" + when: nfs_exports|length diff --git a/tasks/main.yml b/tasks/main.yml index 9cb7bab..e0284f2 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -19,8 +19,9 @@ when: ansible_os_family == 'Debian' - name: Ensure directories to export exist - file: path="{{ item.strip().split()[0] }}" state=directory + file: 'path="{{ item.strip().split()[0] }}" state=directory' with_items: nfs_exports + notify: restart nfs - name: Copy exports file. template: