mirror of
https://github.com/geerlingguy/ansible-role-nfs
synced 2024-11-03 10:33:29 +01:00
Fix folder duplicate checks
A folder may be exported to multiple clients/ranges. This patch ensures the folder existence is checked only once. Besides, the strip function is useless, split does strip strings Signed-off-by: David Rozé <droze@baylibre.com>
This commit is contained in:
parent
799d43499e
commit
2b82deba45
1 changed files with 2 additions and 2 deletions
|
@ -18,9 +18,9 @@
|
|||
|
||||
- name: Ensure directories to export exist
|
||||
file: # noqa 208
|
||||
path: "{{ item.strip().split()[0] }}"
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
with_items: "{{ nfs_exports }}"
|
||||
with_items: "{{ nfs_exports | map('split') | map('first') | unique }}"
|
||||
|
||||
- name: Copy exports file.
|
||||
template:
|
||||
|
|
Loading…
Reference in a new issue