Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

core

ANSIBLE VERSION

ansible 2.2.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides

CONFIGURATION

This bug is related to tripleo-quickstart, an Ansible based project for setting up TripleO virtual environments, which customizes the conf as follows:

[defaults]
command_warnings = False
retry_files_enabled = False
callback_whitelist = profile_tasks
host_key_checking = False
force_color = 1

# Attempt to load custom modules whether it's installed system-wide or from a virtual environment
callback_plugins = /usr/lib/python2.7/site-packages/ara/plugins/callbacks:$VIRTUAL_ENV/lib/python2.7/site-packages/ara/plugins/callbacks:/usr/local/lib/python2.7/dist-packages/ara/plugins/callbacks
test_plugins = /usr/lib/python2.7/site-packages/tripleo-quickstart/test_plugins:$VIRTUAL_ENV/usr/local/share/tripleo-quickstart/test_plugins:test_plugins
library = /usr/lib/python2.7/site-packages/tripleo-quickstart/library:$VIRTUAL_ENV/usr/local/share/tripleo-quickstart/library:library
roles_path = roles:$VIRTUAL_ENV/usr/local/share/tripleo-quickstart/roles:$VIRTUAL_ENV/usr/local/share/ansible/roles

[ssh_connection]
control_path = %(directory)s/%%h-%%r

So nothing that seems related to the problem I'm getting.

OS / ENVIRONMENT

CentOS Linux release 7.3.1611 (Core)

SUMMARY

Until ansible 2.1.0 this section of my main task always worked:

- name: Get overcloud-ha-test-suite on undercloud and controllers
vars:
nodes:
- "undercloud"
- "{{ groups['controller'] }}"
shell: >
rm -rf tripleo-director-ha-test-suite;
git clone https://github.com/rscarazz/tripleo-director-ha-test-suite/ tripleo-director-ha-test-suite;
delegate_to: "{{ item }}"
with_items: "{{ nodes }}"

Each element of nodes exists and is taken from the correctly populated inventory.

After upgrading to ansible 2.2.0 a strange behavior happens, the section fails because {{ item }} takes values like "skipped" and "changed" making ssh connections failing.

Issue was solved by this commit, with this modification:

- name: Get overcloud-ha-test-suite on undercloud and controllers
shell: >
rm -rf tripleo-director-ha-test-suite;
git clone https://github.com/rscarazz/tripleo-director-ha-test-suite/ tripleo-director-ha-test-suite;
delegate_to: "{{ item }}"
with_items:
- "undercloud"
- "{{ groups['controller'] }}"

but I think it should work in both cases.

STEPS TO REPRODUCE

To reproduce the problem simply use the code above, trying to run the action after creating an inventory with expected elements, "undercloud" and "{{ groups['controller'] }}" (usually a 3 elements array).

EXPECTED RESULTS

Execution of the action, without any error in both cases.

ACTUAL RESULTS

As one can see from the output the host on which the action is taken is "skipped" and not the hostname as expected:

14:59:42 <skipped> ESTABLISH SSH CONNECTION FOR USER: None
14:59:42 <skipped> SSH: EXEC ssh -vvv -F workspace/ssh.config.ansible -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 skipped '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1485269982.15-73426610894136 `" && echo ansible-tmp-1485269982.15-73426610894136="` echo $HOME/.ansible/tmp/ansible-tmp-1485269982.15-73426610894136 `" ) && sleep 0'"'"''
14:59:42 failed: [undercloud] (item=skipped) => {
14:59:42 "item": "skipped",
14:59:42 "msg": "Failed to connect to the host via ssh: OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data workspace/ssh.config.ansible\r\ndebug1: workspace/ssh.config.ansible line 2: Applying options for *\r\nssh: Could not resolve hostname skipped: Name or service not known\r\n",
14:59:42 "unreachable": true
14:59:42 }

Same is on the next error, but this time with "changed":

14:59:42 <changed> ESTABLISH SSH CONNECTION FOR USER: None
14:59:42 <changed> SSH: EXEC ssh -vvv -F workspace/ssh.config.ansible -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 changed '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1485269982.24-237524239100501 `" && echo ansible-tmp-1485269982.24-237524239100501="` echo $HOME/.ansible/tmp/ansible-tmp-1485269982.24-237524239100501 `" ) && sleep 0'"'"''
14:59:42 failed: [undercloud] (item=changed) => {
14:59:42 "item": "changed",
14:59:42 "msg": "Failed to connect to the host via ssh: OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data workspace/ssh.config.ansible\r\ndebug1: workspace/ssh.config.ansible line 2: Applying options for *\r\nssh: Could not resolve hostname changed: Name or service not known\r\n",
14:59:42 "unreachable": true
14:59:42 }

I don't know if this can be considered a duplicate of this other issue, since the behavior is slightly different, but maybe it is related.

Issue 2:
From @naslanidis on 2016-03-07T01:20:17Z

Issue Type:

Feature Idea

Component Name:

ec2_vpc.py

Ansible Version:

ansible 2.0.0.2

config file = /home/naslanidis/code/ag-vpc-management/ansible.cfg

configured module search path = /usr/share/ansible/modules

Ansible Configuration:

N/A

Environment:

Fedora 22 x64

Summary:

When creating VPC's using this module, if any tag is changed or added a completely new VPC is created rather than the tags being added or updated. Looking at the documentation, all tags are used along with the cidr range to uniquely identify an existing VPC. In my opinion this should just be a NAME tag and other tags should be able to be added, changed and removed for an existing VPC

Steps To Reproduce:

Create a VPC using this module with a number of tags in place

Add a new tag (e.g. cost code), and rerun the script

A new duplicate VPC is created rather than adding the cost code tag to the existing VPC

- name: test out vpc module 1st run though
ec2_vpc:
state: present
region: ap-southeast-2
profile: non_prod
cidr_block: 10.33.0.0/16
resource_tags:
Name: AAG-VPC-33
Owner: ABC
register: created_vpc

- name: test out vpc module 2nd run though
ec2_vpc:
state: present
region: ap-southeast-2
profile: non_prod
cidr_block: 10.33.0.0/16
resource_tags:
Name: AAG-VPC-33
Owner: ABC
Cost_code: 3
register: created_vpc

Expected Results:

The existing VPC should be updated with the new Cost_code tag.

Actual Results:

A new VPC is created that duplicates the first VPC.

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