Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

ansible-playbook

ANSIBLE VERSION

ansible 2.2.2.0

CONFIGURATION

OS / ENVIRONMENT

Debian Jessie

SUMMARY

Duplicate role in a playbook is played only once, this changes behaviour compared to ansible-playbook 2.2.1.0

STEPS TO REPRODUCE

- hosts: my_hosts
roles:
- { role: a }
- { role: a }

Run:

ansible-playbook -i hosts playbook.yaml

EXPECTED RESULTS

with 2.2.1.0:

PLAY [my_hosts] ****************************************************************

TASK [setup] *******************************************************************
ok: [my_host]

TASK [a : debug] ***************************************************************
ok: [my_host] => {
"msg": "test a"
}

TASK [a : debug] ***************************************************************
ok: [my_host] => {
"msg": "test a"
}

PLAY RECAP *********************************************************************
my_host : ok=3 changed=0 unreachable=0 failed=0

ACTUAL RESULTS

with 2.2.2.0:

PLAY [my_hosts] ****************************************************************

TASK [setup] *******************************************************************
ok: [my_host]

TASK [a : debug] ***************************************************************
ok: [my_host] => {
"msg": "test a"
}

PLAY RECAP *********************************************************************
my_host : ok=2 changed=0 unreachable=0 failed=0

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

ec2_ami_find

ANSIBLE VERSION

ansible 2.3.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/usr/share/ansible', u'library']
python version = 2.7.13 (default, Apr 4 2017, 08:44:49) [GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]

CONFIGURATION

pip install --upgrade ansible

OS / ENVIRONMENT

MAC OSX

SUMMARY

with ansible 2.2 ec2_ami_find was working. Right after the upgrade it started failing with 'Image' object has no attribute 'creationDate' error.

I have quick workaround commenting out line 393 in ec2_ami_find.py but the playbook work only on my local laptop that way.

STEPS TO REPRODUCE

- name: Some name
ec2_ami_find:
aws_access_key: "{{ aws_access_key }}"
aws_secret_key: "{{ aws_secret_key }}"
region: "{{ vpc_region }}"
name: "myAMI-*"
sort: name
sort_order: descending
sort_end: 1
no_result_action: fail
state: available
register: ami

EXPECTED RESULTS

to return AMIs

ACTUAL RESULTS

Using module file /usr/local/lib/python2.7/site-packages/ansible/modules/cloud/amazon/ec2_ami_find.py

ESTABLISH LOCAL CONNECTION FOR USER: ysimeonov

EXEC /bin/sh -c 'echo ~ && sleep 0'

EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /Users/ysimeonov/.ansible/tmp/ansible-tmp-1493146368.66-222958382107587" && echo ansible-tmp-1493146368.66-222958382107587="echo /Users/ysimeonov/.ansible/tmp/ansible-tmp-1493146368.66-222958382107587" ) && sleep 0'

PUT /var/folders/6f/dxlpfp7521s25qc6gk1pr4jr0000gp/T/tmpQeCvFU TO /Users/ysimeonov/.ansible/tmp/ansible-tmp-1493146368.66-222958382107587/ec2_ami_find.py

EXEC /bin/sh -c 'chmod u+x /Users/ysimeonov/.ansible/tmp/ansible-tmp-1493146368.66-222958382107587/ /Users/ysimeonov/.ansible/tmp/ansible-tmp-1493146368.66-222958382107587/ec2_ami_find.py && sleep 0'

EXEC /bin/sh -c '/usr/bin/python /Users/ysimeonov/.ansible/tmp/ansible-tmp-1493146368.66-222958382107587/ec2_ami_find.py; rm -rf "/Users/ysimeonov/.ansible/tmp/ansible-tmp-1493146368.66-222958382107587/" > /dev/null 2>&1 && sleep 0'

The full traceback is:

Traceback (most recent call last):

File "/var/folders/6f/dxlpfp7521s25qc6gk1pr4jr0000gp/T/ansible_DzojF6/ansible_module_ec2_ami_find.py", line 439, in

main()

File "/var/folders/6f/dxlpfp7521s25qc6gk1pr4jr0000gp/T/ansible_DzojF6/ansible_module_ec2_ami_find.py", line 393, in main

'creationDate': image.creationDate,

AttributeError: 'Image' object has no attribute 'creationDate'

fatal: [localhost]: FAILED! => {

"changed": false,

"failed": true,

"module_stderr": "Traceback (most recent call last):\n File "/var/folders/6f/dxlpfp7521s25qc6gk1pr4jr0000gp/T/ansible_DzojF6/ansible_module_ec2_ami_find.py", line 439, in \n main()\n File "/var/folders/6f/dxlpfp7521s25qc6gk1pr4jr0000gp/T/ansible_DzojF6/ansible_module_ec2_ami_find.py", line 393, in main\n 'creationDate': image.creationDate,\nAttributeError: 'Image' object has no attribute 'creationDate'\n",

"module_stdout": "",

"msg": "MODULE FAILURE",

"rc": 0

}