Issue 1:
ISSUE TYPE

Bug Report

COMPONENT NAME

Module iam_cert

ANSIBLE VERSION

ansible 2.3.0.0
config file =
configured module search path = Default w/o overrides
python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]

CONFIGURATION

No changes

OS / ENVIRONMENT

Ubuntu Linux 16.04 install via PIP

SUMMARY

iam_cert task fails with an error message:

fatal: [10.0.21.71]: FAILED! => {"changed": false, "failed": true, "msg": "Boto is required for this module"}

Boto and Boto3 are installed and work fine for the rest of the scripts so it appears as if this is restricted to this module. Failure is independent of the state of the validate_certs flag.

STEPS TO REPRODUCE

The task is as follows:

- name: Set a key on AWS for the HTTPS load balancer
iam_cert:
name: iam_cert_name
state: present
cert: "{{ ssl_cert }}"
key: "{{ ssl_keys }}"
cert_chain: "{{ ssl_chain }}"
when: cloud_vendor == "aws"

Failure because the module reports "Boto not found"

EXPECTED RESULTS

Uploaded certificate details

ACTUAL RESULTS

task path: /home/davehornco/aws-janobi/roles/proxy/tasks/main.yml:52
Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/cloud/amazon/iam_cert.py
<10.0.17.158> ESTABLISH SSH CONNECTION FOR USER: davehornco
Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/cloud/amazon/iam_cert.py
<10.0.21.71> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.17.158> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/9e46df15d8 10.0.17.158 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<10.0.21.71> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/5f9cbb3064 10.0.21.71 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<10.0.21.71> (0, '/home/davehornco\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18465\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status <10.0.17.158> (0, '/home/davehornco\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18462\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
from master 0\r\n')
<10.0.17.158> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.21.71> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.17.158> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/9e46df15d8 10.0.17.158 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095 `" && echo ansible-tmp-1494661506.94-77749697865095="` echo /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095 `" ) && sleep 0'"'"''
<10.0.21.71> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/5f9cbb3064 10.0.21.71 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550 `" && echo ansible-tmp-1494661506.94-269551299808550="` echo /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550 `" ) && sleep 0'"'"''
<10.0.17.158> (0, 'ansible-tmp-1494661506.94-77749697865095=/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18462\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.17.158> PUT /tmp/tmp1XsqVZ TO /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/iam_cert.py
<10.0.17.158> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/9e46df15d8 '[10.0.17.158]'
<10.0.21.71> (0, 'ansible-tmp-1494661506.94-269551299808550=/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18465\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.21.71> PUT /tmp/tmpfErvCB TO /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/iam_cert.py
<10.0.21.71> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/5f9cbb3064 '[10.0.21.71]'
<10.0.17.158> (0, 'sftp> put /tmp/tmp1XsqVZ /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/iam_cert.py\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18462\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "posix-rename@openssh.com" revision 1\r\ndebug2: Server supports extension "statvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "fstatvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "hardlink@openssh.com" revision 1\r\ndebug2: Server supports extension "fsync@openssh.com" revision 1\r\ndebug3: Sent message fd 5 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/davehornco size 0\r\ndebug3: Looking up /tmp/tmp1XsqVZ\r\ndebug3: Sent message fd 5 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/iam_cert.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:6 O:65536 S:3648\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 32768 bytes at 32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 6 3648 bytes at 65536\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.17.158> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.17.158> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/9e46df15d8 10.0.17.158 '/bin/sh -c '"'"'chmod u+x /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/ /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/iam_cert.py && sleep 0'"'"''
<10.0.21.71> (0, 'sftp> put /tmp/tmpfErvCB /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/iam_cert.py\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18465\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug2: Remote version: 3\r\ndebug2: Server supports extension "posix-rename@openssh.com" revision 1\r\ndebug2: Server supports extension "statvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "fstatvfs@openssh.com" revision 2\r\ndebug2: Server supports extension "hardlink@openssh.com" revision 1\r\ndebug2: Server supports extension "fsync@openssh.com" revision 1\r\ndebug3: Sent message fd 5 T:16 I:1\r\ndebug3: SSH_FXP_REALPATH . -> /home/davehornco size 0\r\ndebug3: Looking up /tmp/tmpfErvCB\r\ndebug3: Sent message fd 5 T:17 I:2\r\ndebug3: Received stat reply T:101 I:2\r\ndebug1: Couldn\'t stat remote file: No such file or directory\r\ndebug3: Sent message SSH2_FXP_OPEN I:3 P:/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/iam_cert.py\r\ndebug3: Sent message SSH2_FXP_WRITE I:4 O:0 S:32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 4 32768 bytes at 0\r\ndebug3: Sent message SSH2_FXP_WRITE I:5 O:32768 S:32768\r\ndebug3: Sent message SSH2_FXP_WRITE I:6 O:65536 S:3648\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 5 32768 bytes at 32768\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: In write loop, ack for 6 3648 bytes at 65536\r\ndebug3: Sent message SSH2_FXP_CLOSE I:4\r\ndebug3: SSH2_FXP_STATUS 0\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.21.71> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.21.71> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/5f9cbb3064 10.0.21.71 '/bin/sh -c '"'"'chmod u+x /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/ /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/iam_cert.py && sleep 0'"'"''
<10.0.17.158> (0, '', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18462\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.17.158> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.17.158> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/9e46df15d8 -tt 10.0.17.158 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-yticsqsyyxklqvvcexagsghtzplbfgoa; /usr/bin/python /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/iam_cert.py; rm -rf "/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-77749697865095/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<10.0.21.71> (0, '', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18465\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n')
<10.0.21.71> ESTABLISH SSH CONNECTION FOR USER: davehornco
<10.0.21.71> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/home/davehornco/.ssh/aws-dev"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=davehornco -o ConnectTimeout=10 -o ControlPath=/home/davehornco/.ansible/cp/5f9cbb3064 -tt 10.0.21.71 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-bifuoqxzaombbtliyfahkaufxnlxkvlh; /usr/bin/python /home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/iam_cert.py; rm -rf "/home/davehornco/.ansible/tmp/ansible-tmp-1494661506.94-269551299808550/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''
<10.0.21.71> (0, '\r\n{"msg": "Boto is required for this module", "failed": true, "invocation": {"module_args": {"profile": null, "new_name": null, "dup_ok": false, "new_path": null, "name": "iam_cert_name", "security_token": null, "cert": "/home/bob/.acme.sh/dev.horn.co/dev.horn.co.cer", "region": null, "aws_secret_key": null, "aws_access_key": null, "state": "present", "key": "/home/bob/.acme.sh/dev.horn.co/dev.horn.co.key", "ec2_url": null, "path": "/", "validate_certs": true, "cert_chain": "/home/bob/.acme.sh/dev.horn.co/fullchain.cer"}}}\r\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18465\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 10.0.21.71 closed.\r\n')
<10.0.17.158> (0, '\r\n{"msg": "Boto is required for this module", "failed": true, "invocation": {"module_args": {"profile": null, "new_name": null, "dup_ok": false, "new_path": null, "name": "iam_cert_name", "security_token": null, "cert": "/home/bob/.acme.sh/dev.horn.co/dev.horn.co.cer", "region": null, "aws_secret_key": null, "aws_access_key": null, "state": "present", "key": "/home/bob/.acme.sh/dev.horn.co/dev.horn.co.key", "ec2_url": null, "path": "/", "validate_certs": true, "cert_chain": "/home/bob/.acme.sh/dev.horn.co/fullchain.cer"}}}\r\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /home/davehornco/.ssh/config\r\ndebug1: /home/davehornco/.ssh/config line 1: Applying options for 10.*\r\ndebug2: add_identity_file: ignoring duplicate key /home/davehornco/.ssh/aws-dev\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18462\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 10.0.17.158 closed.\r\n')
fatal: [10.0.21.71]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"aws_access_key": null,
"aws_secret_key": null,
"cert": "somefile",
"cert_chain": "somefile",
"dup_ok": false,
"ec2_url": null,
"key": "somefile",
"name": "iam_cert_name",
"new_name": null,
"new_path": null,
"path": "/",
"profile": null,
"region": null,
"security_token": null,
"state": "present",
"validate_certs": true
}
},
"msg": "Boto is required for this module"
}
fatal: [10.0.17.158]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"aws_access_key": null,
"aws_secret_key": null,
"cert": "somefile",
"cert_chain": "somefile",
"dup_ok": false,
"ec2_url": null,
"key": "somefile",
"name": "iam_cert_name",
"new_name": null,
"new_path": null,
"path": "/",
"profile": null,
"region": null,
"security_token": null,
"state": "present",
"validate_certs": true
}
},
"msg": "Boto is required for this module"
}

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

command

shell

yum

dnf

ANSIBLE VERSION

ansible 2.2.0.0
config file = /home/msanabria/repos/ansible-workstation/ansible.cfg
configured module search path = Default w/o overrides

CONFIGURATION

ansible.cfg:

[defaults]
ansible_managed = This file is managed by Ansible. All changes will be overwritten.
inventory = hosts.yml
retry_files_enabled = false

[privilege_escalation]
become_ask_pass = True

OS / ENVIRONMENT

Control node:

Fedora release 25 (Twenty Five)

Managed node:

Fedora release 25 (Twenty Five)

SUMMARY

When running a playbook with --tags options that specifies a tag of a task or tasks within a role, any dependencies of that role are not executed.

STEPS TO REPRODUCE

tree:

.
├── ansible.cfg
├── hosts.yml
├── roles
│ ├── apps
│ │ ├── meta
│ │ │ └── main.yml
│ │ └── tasks
│ │ ├── chrome.yml
│ │ └── main.yml
│ └── common
│ ├── meta
│ │ └── main.yml
│ └── tasks
│ └── main.yml
└── workstation_setup.yml

hosts.yml

[workstation]
localhost ansible_connection=local

roles/apps/meta/main.yml

---
dependencies:
- { role: common }

roles/apps/tasks/chrome.yml

---
- name: Install Google Chrome
dnf:
...

roles/apps/tasks/main.yml

---
- name: Include chrome.yml
include: chrome.yml
tags:
- chrome

roles/common/meta/main.yml

---
allow_duplicates: yes

roles/common/tasks/main.yml

---
- name: Install common packages
dnf:
...

workstation_setup.yml

---
- name: Playbook to configure a Fedora workstation
hosts: workstation
become: yes

roles:
- { role: common }
- { role: apps }

EXPECTED RESULTS

Expected Ansible to execute the dependency of the role with the tagged task(s).

$ ansible-playbook workstation_setup.yml --tags chrome --list-tasks

playbook: workstation_setup.yml

play #1 (workstation): Playbook to configure a Fedora workstation	TAGS: []
tasks:
common : Install common packages	TAGS: []
apps : Install Google Chrome	TAGS: [chrome]

ACTUAL RESULTS

Ansible only executes the tagged task(s) and not any dependencies.

$ ansible-playbook workstation_setup.yml --tags chrome --list-tasks

playbook: workstation_setup.yml

play #1 (workstation): Playbook to configure a Fedora workstation	TAGS: []
tasks:
apps : Install Google Chrome	TAGS: [chrome]