summaryrefslogtreecommitdiffstats
path: root/ansible/roles/nfs/tasks/main.yml
diff options
context:
space:
mode:
authorMichal Zegan <m.zegan@samsung.com>2019-04-09 15:21:52 +0200
committerSamuli Silvius <s.silvius@partner.samsung.com>2019-04-17 08:18:00 +0000
commit1266d180911300c4236a6e1411b1f1782884dafb (patch)
tree90488bd4aa1bde844a1d14a74bf817bd9591734b /ansible/roles/nfs/tasks/main.yml
parentbb3bef83ca562b9aadc288b3ec46264d73ec73ac (diff)
Improve nfs role
This commit improves the nfs role by using cluster_ip variable instead of ansible_host for getting nfs client/server address, and using /etc/exports.d instead of /etc/exports for exporting nfs filesystem. Also, this commit fixes other issues in molecule found along the way. Change-Id: Ibd4ea5d4fd937116e2dc9e1b6f85c3e019f62e17 Issue-ID: OOM-1770 Signed-off-by: Michal Zegan <m.zegan@samsung.com>
Diffstat (limited to 'ansible/roles/nfs/tasks/main.yml')
-rw-r--r--ansible/roles/nfs/tasks/main.yml4
1 files changed, 2 insertions, 2 deletions
diff --git a/ansible/roles/nfs/tasks/main.yml b/ansible/roles/nfs/tasks/main.yml
index e7580b66..1d848876 100644
--- a/ansible/roles/nfs/tasks/main.yml
+++ b/ansible/roles/nfs/tasks/main.yml
@@ -23,7 +23,7 @@
- name: Add hosts to exports
template:
src: exports.j2
- dest: /etc/exports
+ dest: /etc/exports.d/dockerdata-nfs.exports
notify:
- reload nfs
when:
@@ -35,7 +35,7 @@
- name: Mount dockerdata-nfs
mount:
path: "{{ nfs_mount_path }}"
- src: "{{ hostvars[groups['nfs-server'].0].ansible_host | default(hostvars[groups['nfs-server'].0].inventory_hostname) }}:{{ nfs_mount_path }}"
+ src: "{{ hostvars[groups['nfs-server'].0].cluster_ip }}:{{ nfs_mount_path }}"
fstype: nfs
state: mounted
when: