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

Merge pull request #2 from shahaan/mcc-nectar

Feature requests for syncExports, enabling a list in vars section
parents b7408fa0 d85dec1b
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
- easy-rsa-CA - easy-rsa-CA
- easy-rsa-certificate - easy-rsa-certificate
- OpenVPN-Server - OpenVPN-Server
- nfs-common
- nfs-server - nfs-server
sudo: true sudo: true
vars: vars:
...@@ -19,7 +18,6 @@ ...@@ -19,7 +18,6 @@
- easy-rsa-common - easy-rsa-common
- easy-rsa-certificate - easy-rsa-certificate
- OpenVPN-Client - OpenVPN-Client
- nfs-common
- { role: syncExports, group_list:['openvpn-clients'], interface_list: ['eth0','tun0'] } - { role: syncExports, group_list:['openvpn-clients'], interface_list: ['eth0','tun0'] }
- nfs-client - nfs-client
sudo: true sudo: true
......
{% for export in exportList %} {% for export in exportList %}
{{ export.src }} {% for group_name in group_list %}{% for node in groups[group_name] %}{% for interface_name in interface_list %}{{ hostvars[node]['ansible_'+interface_name]['ipv4']['address'] }}(rw,sync,root_squash) {% endfor %}{% endfor %}{% endfor %} {{ export.src }} {% for group in groupList %}{% for node in groups[group.name] %}{% for interface_name in group.interfaces %}{{ hostvars[node]['ansible_'+interface_name]['ipv4']['address'] }}(rw,sync,root_squash) {% endfor %}{% endfor %}{% endfor %}
{% endfor %} {% endfor %}
---
groupList:
- { name : 'openvpn-clients', interfaces : ['tun0'] }
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
hosts: openvpn-clients hosts: openvpn-clients
remote_user: ec2-user remote_user: ec2-user
roles: roles:
- { role: syncExports, group_list:['openvpn-clients'], interface_list: ['eth0','tun0'] } - syncExports
- nfs-client - nfs-client
sudo: true sudo: true
vars: vars:
......
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