Skip to content
Snippets Groups Projects
Commit cb16047c authored by Shahaan Ayyub's avatar Shahaan Ayyub
Browse files

Merge pull request #6 from shahaan/mcc-nectar

Templated the mount interface
parents ca0aba9f ca163187
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
run_once: true run_once: true
delegate_to: "{{ nfs_server }}" delegate_to: "{{ nfs_server }}"
- -
mount: "name={{ item.name }} src={{ nfsServer['ansible_facts']['ansible_tun0']['ipv4']['address'] }}:{{ item.src }} fstype={{ item.fstype }} opts={{ item.opts }} state=mounted" mount: "name={{ item.name }} src={{ nfsServer['ansible_facts']['ansible_'+item.interface]['ipv4']['address'] }}:{{ item.src }} fstype={{ item.fstype }} opts={{ item.opts }} state=mounted"
name: "Mounting NFS mounts" name: "Mounting NFS mounts"
with_items: exportList with_items: exportList
notify: "restart authentication" notify: "restart authentication"
......
--- ---
# This is a list of exports, individual entry for each mount. # This is a list of exports, individual entry for each mount.
exportList: exportList:
- { name : '/mnt/test-nfs', src : '/mnt',fstype : 'nfs', opts : 'vers=3,noatime,rsize=16384,wsize=16384,hard,intr,tcp,nolock' } - { name : '/mnt/test-nfs', src : '/mnt',fstype : 'nfs', opts : 'vers=3,noatime,rsize=16384,wsize=16384,hard,intr,tcp,nolock' , interface : 'tun0' }
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
- include: yumPackages.yml - include: yumPackages.yml
- name: setup idmap.conf - name: setup idmap.conf
template: src=idmap.conf.j2 dest=/etc/idmap.conf template: src=idmapd.conf.j2 dest=/etc/idmapd.conf
sudo: true sudo: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment