Yes we discussed that on Github as well.
Thanks again Michael!
On Wednesday, April 9, 2014 3:38:02 PM UTC+2, Michael DeHaan wrote:
>
> This is a question about variables with 'illegal' characters in them not
> being able to be accessed in short form.
>
> I believe I also discussed this on GitHub previously, though the solution
> is just:
>
> -l {{ hostvars[inventory_hostname]["ansible_bond1.2108"].ipv4.address }}
>
> I believe I also left the ticket open and suggested we replace "." with
> "_" so it allows the fact to be accessed directly, though this would be a
> backwards incompatible change for those that had dots in interface names --
> it's easier than needing to know the above.
>
>
>
>
>
> On Mon, Apr 7, 2014 at 7:59 AM, Sébastien Han
> <[email protected]<javascript:>
> > wrote:
>
>> Hi all,
>>
>> This seems to only happen with a vlan on top of a bond device.
>>
>> The fact gathers the nic properly:
>>
>> pouet1 | success >> {
>> "ansible_facts": {
>> "ansible_bond1.2108": {
>> "active": true,
>> "device": "bond1.2108",
>> "ipv4": {
>> "address": "192.168.0.1",
>> "netmask": "255.255.255.0",
>> "network": "192.168.0.0"
>> },
>> "ipv6": [
>> {
>> "address": "fe80::b6b5:2fff:fe63:4e69",
>> "prefix": "64",
>> "scope": "link"
>> }
>> ],
>> "macaddress": "b4:b5:2f:25:6e:90",
>> "mtu": 1500,
>> "promisc": false,
>> "type": "ether"
>> }
>> },
>> "changed": false
>> }
>>
>>
>> However while trying to use this variable inside a playbook like this:
>>
>>
>> - name: tell memcached what IP to listen on
>> lineinfile: dest=/etc/memcached.conf regexp="^-l" line='-l {{
>> ansible_bond1.2108.ipv4.address }}'
>> notify: restart memcached
>>
>>
>> I get the following in the memcached.conf:
>>
>> -l {{ansible_bond1.2108.ipv4.address}}
>>
>> I've tried with another nic such as eth0 and it works like a charm.
>> Am I hitting a bug?
>>
>> Thanksin advance!
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/fe2c37ce-0555-4ece-9be4-f804185ece04%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/fe2c37ce-0555-4ece-9be4-f804185ece04%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/829912e2-78dd-4ecf-88bb-e5853906b52c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.