{"push_id":2925877151,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"6130bc841dd25adf9a1ae26e6f82aef6b33328d8","before":"85071e6e530ddd80df35920d9fbe63047478d66b","commits":[{"sha":"6130bc841dd25adf9a1ae26e6f82aef6b33328d8","author":{"name":"Guillaume Abrioux","email":"30a9df5a0293a6108675377fa1673f7aa713f915@redhat.com"},"message":"config: look up for monitor_address_block in hostvars\n\n`monitor_address_block` should be read from hostvars[host] instead of\ncurrent node being played.\n\neg:\n\nLet's assume we have:\n\n```\n[mons]\nceph-mon0 monitor_address=192.168.1.10\nceph-mon1 monitor_interface=eth1\nceph-mon2 monitor_address_block=192.168.1.0/24\n```\n\nthe ceph.conf generation task will end up with:\n\n```\nfatal: [ceph-mon0]: FAILED! => {}\n\nMSG:\n\n'ansible.vars.hostvars.HostVarsVars object' has no attribute u'ansible_interface'\n```\n\nthe reason is that it will assume `monitor_address_block` isn't defined even on\nceph-mon2 because looking for `monitor_address_block` instead of\n`hostvars[host]['monitor_address_block']`, therefore it enters in the condition as default value:\n\n```\n    {%- else -%}\n      {% set interface = 'ansible_' + (monitor_interface | replace('-', '_')) %}\n      {% if ip_version == 'ipv4' -%}\n        {{ hostvars[host][interface][ip_version]['address'] }}\n      {%- elif ip_version == 'ipv6' -%}\n        [{{ hostvars[host][interface][ip_version][0]['address'] }}]\n      {%- endif %}\n    {%- endif %}\n```\n\n`monitor_interface` is set with default value `'interface'` so the `interface`\nvariable is built with 'ansible_' + 'interface'. It makes ansible throwing a\nconfusing message about `'ansible_interface'`.\n\nCloses: https://bugzilla.redhat.com/show_bug.cgi?id=1635303\n\nSigned-off-by: Guillaume Abrioux <gabrioux@redhat.com>","distinct":true,"url":"https://api.github.com/repos/ceph/ceph-ansible/commits/6130bc841dd25adf9a1ae26e6f82aef6b33328d8"}]}
{"actor":{"display_login":"leseb"}}