Skip to content
Snippets Groups Projects
Commit 90d87f9c authored by Jupiter Hu's avatar Jupiter Hu
Browse files

add handler

parent 4b077fc7
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,12 @@ ...@@ -6,6 +6,12 @@
delegate_to: "{{ nfs_server }}" delegate_to: "{{ nfs_server }}"
when: nfsServer is not defined when: nfsServer is not defined
- name: "Debug ansible_facts dictinary"
debug: msg="debug nfsHomeServer {{ nfsHomeServer['ansible_facts']['ansible_eth0']['ipv4']['address'] }}"
- name: "Debug ansible_facts dictinary 2"
debug: msg="debug nfsServer {{ nfsServer['ansible_facts']['ansible_eth0']['ipv4']['address'] }}"
- name: "Mounting NFS mounts" - name: "Mounting NFS mounts"
mount: "name={{ item.name }} src={{ nfsServer['ansible_facts']['ansible_'+item.interface]['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"
with_items: exportList with_items: exportList
......
...@@ -5,9 +5,4 @@ ...@@ -5,9 +5,4 @@
delegate_to: "{{ nfs_server }}" delegate_to: "{{ nfs_server }}"
run_once: true run_once: true
sudo: true sudo: true
#- notify: "Reload exports"
# name : Restart the NFS Server
# service: name=nfs state=restarted
# delegate_to: "{{ nfs_server }}"
# run_once: true
# sudo: true
{% for export in exportList %} {% for export in exportList %}
{{ export.src }} {% for group in groupList %}{% for node in groups[group.name] %}{{ hostvars[node]['ansible_'+group.interface]['ipv4']['address'] }}({{ export.option }}) {% endfor %}{% endfor %} {{ export.src }} {% for group in groupList %}{% for node in groups[group.name] %}{{ hostvars[node]['ansible_'+group.interface]['ipv4']['address'] }}({{ export.srvopts }}) {% endfor %}{% endfor %}
{% endfor %} {% endfor %}
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