-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Ansible error "The loop variable 'item' is already in use." in `n…
…fs-client` setup.
- Loading branch information
1 parent
d9357e2
commit ca8593a
Showing
2 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
elasticluster/share/playbooks/roles/nfs-client/tasks/nfsmount.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
--- | ||
|
||
- name: ensure {{item.mountpoint}} directory exists | ||
- name: ensure {{fs.mountpoint}} directory exists | ||
file: | ||
path={{item.mountpoint}} | ||
path={{fs.mountpoint}} | ||
state=directory | ||
|
||
- name: add to /etc/fstab | ||
mount: | ||
name='{{item.mountpoint}}' | ||
src='{{item.fs}}' | ||
name='{{fs.mountpoint}}' | ||
src='{{fs.fs}}' | ||
fstype=nfs | ||
opts='{{item.options|default("rw,async")}}' | ||
state='{{item.state|default("mounted")}}' | ||
opts='{{fs.options|default("rw,async")}}' | ||
state='{{fs.state|default("mounted")}}' | ||
|
||
|
||
- name: Allow NFS homes through SELinux | ||
command: | | ||
setsebool -P use_nfs_home_dirs=1 | ||
when: '{{is_rhel_compatible}} and "{{item.mountpoint}}" == "/home"' | ||
when: '{{is_rhel_compatible}} and "{{fs.mountpoint}}" == "/home"' |