Issue 1:
From @alitvak69 on 2016-10-27T00:03:27Z

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

Enabled smart gathering

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"
}
}

Copied from original issue: ansible/ansible-modules-core#5403

Issue 2:
Hi,

I've made a very basic gist to demonstrate the current issue that I'm having.

https://gist.github.com/thegiantbeast/90efb8cb1a08cdef8c0b

The problem is that { role: installVersion, pkgVersion: "{{ currentVersion }}" } is only executed once, although the currentVersion keeps changing between executions (check output).

I believe this is related with what I've seen people mention as 'signature', because the task content/variables never change between them, only the actual variables content.

I even tried with allow_duplicates: true before dependencies: but it didn't work either.

This might be related with #9578 and #11707 as well, but I can't confirm if that's the case.

The current workaround that I've found for this is to add an "extra" (read: never used) variable that changes between the execution "blocks". Example:

dependencies:
- { role: checkVersion, version: "stable" }
- { role: installVersion, pkgVersion: "{{ currentVersion }}", forceExec: "stable" }

- { role: checkVersion, version: "beta" }
- { role: installVersion, pkgVersion: "{{ currentVersion }}", forceExec: "beta" }

- { role: checkVersion, version: "alpha" }
- { role: installVersion, pkgVersion: "{{ currentVersion }}", forceExec: "alpha" }

But this is not scalable if you have a "block" with 10 or more roles.

Has anyone ever saw this issue?

Not 100% sure if this is a bug or an expected behaviour, and if it's an expected behaviour, what's the best way to do implement (other than adding an extra variable)?