Last active
December 9, 2016 20:03
-
-
Save pporada-gl/9b2ec26c8d6c1f94c6faea27baee5fb3 to your computer and use it in GitHub Desktop.
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
### Assume this list of ips | |
192.168.33.10,192.168.33.11,192.168.33.12 | |
"retry_join": [{% for h in groups['consul_servers'] %}"{{ hostvars[h].ansible_eth1.ipv4.address|difference(ansible_all_ipv4_addresses)|list }}"{% if not loop.last %},{% endif %}{% endfor , | |
### This will output | |
"retry_join": ["[u'1', u'9', u'2', u'.', u'6', u'8', u'3', u'0']"], | |
### I am looking for the following instead of ^ | |
#### Assuming I am on box 192.168.33.12 | |
"retry_join": ["192.168.33.10","192.168.33.11"], |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment