Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

cloudformation_facts

ANSIBLE VERSION

ansible 2.4.0.0

CONFIGURATION

OS / ENVIRONMENT

N/A

SUMMARY

In version prior to 2.4 (i.e. ansible 2.3.2.) when cloudformaion_facts registers the facts under

ansible_facts['cloudformation']['my-cloudformation-stack-ID']

now they are registered under

ansible_facts['cloudformation']['my-cloudformation-stack-NAME']

AWS::CloudFormation::Stack Ref only returns the Stack ID.

This means if we set an CloudFormation Output of mystackID: !Ref mystack and want to use cloudformation_facts

name: get stack facts

cloudformation_facts:

stack_name: "{{ mystack.ouputs.mystackID }}"

name: query mystack cloudformation_facts

facts_var: "{{ cloudformation[ mystack.ouputs.mystackID ].stack_resources.value }}"

This would fail because the facts are now registered under ansible_facts['cloudformation']['my-cloudformation-stack-NAME']

STEPS TO REPRODUCE

Create cloudformation stack with outputs including a AWS::CloudFormation::Stack !Ref called mystackID and value

name: get stack facts

cloudformation_facts:

stack_name: "{{ mystack.ouputs.mystackID }}"

name: query mystack cloudformation_facts

facts_var: "{{ cloudformation[ mystack.ouputs.mystackID ].stack_outputs.value }}"

EXPECTED RESULTS

ansible_facts['cloudformation']['my-cloudformation-stack-ID']

ok: [localhost] => { "ansible_facts": { "cloudformation": { "arn:aws:cloudformation:us-east-2:123456789012:stack/mystack-mynestedstack-sggfrhxhum7w/f449b250-b969-11e0-a185-5081d0136786": { "stack_description": { "capabilities": [ "CAPABILITY_IAM", "CAPABILITY_NAMED_IAM"

ACTUAL RESULTS

ansible_facts['cloudformation']['my-cloudformation-stack-NAME']

ok: [localhost] => { "ansible_facts": { "cloudformation": { "mystack-mynestedstack-sggfrhxhum7w": { "stack_description": { "capabilities": [ "CAPABILITY_IAM", "CAPABILITY_NAMED_IAM"

Issue 2:
I'm copying this issue over from ansible-modules-core as I just recently ran into this.

ansible/ansible-modules-core#5403

ISSUE TYPE

Bug Report

COMPONENT NAME

setup

ANSIBLE VERSION

ansible 2.2.0.0
config file = /home/vagrant/ansible/ansible.cfg
configured module search path = ['/home/vagrant/ansible/library']

CONFIGURATION

gathering: smart

OS / ENVIRONMENT

Ubuntu 16.04.1

SUMMARY

ipv4_secondaries displays duplicate address information

STEPS TO REPRODUCE

Run

ansible -m setup hostname.foo -a "filter=ansible_eth1"

Receive a filtered response with eth1. Here is example of secondaries

"ipv4_secondaries": [
{
"address": "75.145.154.231",
"broadcast": "75.145.154.239",
"netmask": "255.255.255.240",
"network": "75.145.154.224"
},
{
"address": "75.145.154.231",
"broadcast": "75.145.154.239",
"netmask": "255.255.255.240",
"network": "75.145.154.224"
}
],

Information is repeated

ansible -m setup hostname.foo -a "filter=ansible_eth1"

EXPECTED RESULTS

"ipv4_secondaries": [
{
"address": "75.145.154.231",
"broadcast": "75.145.154.239",
"netmask": "255.255.255.240",
"network": "75.145.154.224"
},
],

ACTUAL RESULTS

Received

"ipv4_secondaries": [
{
"address": "75.145.154.231",
"broadcast": "75.145.154.239",
"netmask": "255.255.255.240",
"network": "75.145.154.224"
},
{
"address": "75.145.154.231",
"broadcast": "75.145.154.239",
"netmask": "255.255.255.240",
"network": "75.145.154.224"
}
],

Posting the full verbose output

Loading callback plugin minimal of type stdout, v2.0 from /usr/lib/python2.7/dist-packages/ansible/plugins/callback/__init__.pyc
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/core/system/setup.py
<10.10.10.83> ESTABLISH SSH CONNECTION FOR USER: root
<10.10.10.83> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 10.10.10.83 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1477526333.03-252143209167234 `" && echo ansible-tmp-1477526333.03-252143209167234="` echo $HOME/.ansible/tmp/ansible-tmp-1477526333.03-252143209167234 `" ) && sleep 0'"'"''
<10.10.10.83> PUT /tmp/tmpZmW3aJ TO /root/.ansible/tmp/ansible-tmp-1477526333.03-252143209167234/setup.py
<10.10.10.83> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r '[10.10.10.83]'
<10.10.10.83> ESTABLISH SSH CONNECTION FOR USER: root
<10.10.10.83> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 10.10.10.83 '/bin/sh -c '"'"'chmod u+x /root/.ansible/tmp/ansible-tmp-1477526333.03-252143209167234/ /root/.ansible/tmp/ansible-tmp-1477526333.03-252143209167234/setup.py && sleep 0'"'"''
<10.10.10.83> ESTABLISH SSH CONNECTION FOR USER: root
<10.10.10.83> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r -tt 10.10.10.83 '/bin/sh -c '"'"'/usr/bin/python /root/.ansible/tmp/ansible-tmp-1477526333.03-252143209167234/setup.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1477526333.03-252143209167234/" > /dev/null 2>&1 && sleep 0'"'"''
voippbx.xcastlabs.com | SUCCESS => {
"ansible_facts": {
"ansible_eth1": {
"active": true,
"device": "eth1",
"features": {
"busy_poll": "on [fixed]",
"fcoe_mtu": "off [fixed]",
"generic_receive_offload": "on",
"generic_segmentation_offload": "on",
"highdma": "on [fixed]",
"l2_fwd_offload": "off [fixed]",
"large_receive_offload": "off [fixed]",
"loopback": "off [fixed]",
"netns_local": "off [fixed]",
"ntuple_filters": "off [fixed]",
"receive_hashing": "off [fixed]",
"rx_all": "off [fixed]",
"rx_checksumming": "on [fixed]",
"rx_fcs": "off [fixed]",
"rx_vlan_filter": "on [fixed]",
"rx_vlan_offload": "off [fixed]",
"rx_vlan_stag_filter": "off [fixed]",
"rx_vlan_stag_hw_parse": "off [fixed]",
"scatter_gather": "on",
"tcp_segmentation_offload": "on",
"tx_checksum_fcoe_crc": "off [fixed]",
"tx_checksum_ip_generic": "on",
"tx_checksum_ipv4": "off [fixed]",
"tx_checksum_ipv6": "off [fixed]",
"tx_checksum_sctp": "off [fixed]",
"tx_checksumming": "on",
"tx_fcoe_segmentation": "off [fixed]",
"tx_gre_segmentation": "off [fixed]",
"tx_gso_robust": "on [fixed]",
"tx_ipip_segmentation": "off [fixed]",
"tx_lockless": "off [fixed]",
"tx_nocache_copy": "off",
"tx_scatter_gather": "on",
"tx_scatter_gather_fraglist": "off [fixed]",
"tx_sit_segmentation": "off [fixed]",
"tx_tcp6_segmentation": "on",
"tx_tcp_ecn_segmentation": "on",
"tx_tcp_segmentation": "on",
"tx_udp_tnl_segmentation": "off [fixed]",
"tx_vlan_offload": "off [fixed]",
"tx_vlan_stag_hw_insert": "off [fixed]",
"udp_fragmentation_offload": "on",
"vlan_challenged": "off [fixed]"
},
"ipv4": {
"address": "75.145.154.230",
"broadcast": "75.145.154.239",
"netmask": "255.255.255.240",
"network": "75.145.154.224"
},
"ipv4_secondaries": [
{
"address": "75.145.154.231",
"broadcast": "75.145.154.239",
"netmask": "255.255.255.240",
"network": "75.145.154.224"
},
{
"address": "75.145.154.231",
"broadcast": "75.145.154.239",
"netmask": "255.255.255.240",
"network": "75.145.154.224"
}
],
"ipv6": [
{
"address": "fe80::5c1c:e5ff:fe35:7c81",
"prefix": "64",
"scope": "link"
}
],
"macaddress": "5e:1c:e5:35:7c:81",
"module": "virtio_net",
"mtu": 1500,
"pciid": "virtio4",
"promisc": false,
"type": "ether"
}
},
"changed": false,
"invocation": {
"module_args": {
"fact_path": "/etc/ansible/facts.d",
"filter": "ansible_eth1",
"gather_subset": [
"all"
],
"gather_timeout": 10
},
"module_name": "setup"
}
}