Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible_python_interpreter ignored in Ansible 2.4 for apt module when use async parameter #36536

Closed
ozlevka-work opened this issue Feb 21, 2018 · 7 comments · Fixed by #36541
Closed
Assignees
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. has_pr This issue has an associated PR. module This issue/PR relates to a module. needs_info This issue requires further information. Please answer any outstanding questions. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@ozlevka-work
Copy link

ISSUE TYPE
  • Bug Report
COMPONENT NAME

apt module

ANSIBLE VERSION
ansible 2.4.3.0
  config file = /home/ozlevka/tmp/terraform/ansible.cfg
  configured module search path = ['/home/ozlevka/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ozlevka/.virtualenv/ansible/lib/python3.6/site-packages/ansible
  executable location = /home/ozlevka/.virtualenv/ansible/bin/ansible
  python version = 3.6.3 (default, Nov 17 2017, 17:34:18) [GCC 5.4.0 20160609]

CONFIGURATION
OS / ENVIRONMENT

Linux ubuntu-server 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

SUMMARY

The apt module ignore the ansible_python_interpreter variable when use async parameter

STEPS TO REPRODUCE

configure ansible_python_interpreter=/usr/bin/python3 in inventory
default python interpreter in Ubuntu 16.04
Run playbook

 - name: Install docker dependencies
      apt:
        name: software-properties-common
        update_cache: true
        state: latest
      async: 3600
      poll: 0
EXPECTED RESULTS

Playbook install desired package

ACTUAL RESULTS
fatal: [first]: FAILED! => {"changed": true, "module_stderr": "Shared connection to 10.0.0.56 closed.\r\n", "module_stdout": "/bin/sh: 1: /usr/bin/python: not found\r\n", "msg": "MODULE FAILURE", "rc": 127}
@ansibot
Copy link
Contributor

ansibot commented Feb 21, 2018

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Feb 21, 2018

@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 bug_report module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 21, 2018
@sivel sivel self-assigned this Feb 21, 2018
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Feb 21, 2018
@sivel sivel added the has_pr This issue has an associated PR. label Feb 21, 2018
sivel added a commit to sivel/ansible that referenced this issue Feb 21, 2018
@sivel
Copy link
Member

sivel commented Feb 21, 2018

Could you provide the output invoking ansible-playbook with -vvvv?

needs_info

I'm not convinced that the linked PR on this issue addresses your problem, as I haven't been able to reproduce, but we did find a semi related bug.

@ansibot ansibot added the needs_info This issue requires further information. Please answer any outstanding questions. label Feb 21, 2018
abadger pushed a commit that referenced this issue Feb 22, 2018
* Fix types when evaluating interpreter. Fixes #36536
* Rename variables that contain bytes to b_*
* Get rid of to_text() and to_bytes() calls that do nothing (because the
  data is already the proper type)

(cherry picked from commit a4df4d3)
abadger pushed a commit that referenced this issue Feb 22, 2018
* Fix types when evaluating interpreter. Fixes #36536
* Rename variables that contain bytes to b_*
* Get rid of to_text() and to_bytes() calls that do nothing (because the
  data is already the proper type)
abadger pushed a commit to abadger/ansible that referenced this issue Feb 22, 2018
* Fix types when evaluating interpreter. Fixes ansible#36536
* Rename variables that contain bytes to b_*
* Get rid of to_text() and to_bytes() calls that do nothing (because the
  data is already the proper type)

(cherry picked from commit a4df4d3)
abadger added a commit that referenced this issue Feb 22, 2018
* Fix types when evaluating interpreter (#36541)

* Fix types when evaluating interpreter. Fixes #36536
* Rename variables that contain bytes to b_*
* Get rid of to_text() and to_bytes() calls that do nothing (because the
  data is already the proper type)

(cherry picked from commit a4df4d3)

* Changelog entry for the ansible_*_interpreter fix
@sivel
Copy link
Member

sivel commented Feb 22, 2018

Re-opening as I'm not sure this is resolved yet.

@ozlevka-work
Copy link
Author

ozlevka-work commented Feb 22, 2018

The input you ask me to post is done:

(ansible) ozlevka :~/tmp/terraform > ansible-playbook amazon.yml -vvv
ansible-playbook 2.4.3.0
  config file = /home/ozlevka/tmp/terraform/ansible.cfg
  configured module search path = ['/home/ozlevka/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ozlevka/.virtualenv/ansible/lib/python3.6/site-packages/ansible
  executable location = /home/ozlevka/.virtualenv/ansible/bin/ansible-playbook
  python version = 3.6.3 (default, Nov 17 2017, 17:34:18) [GCC 5.4.0 20160609]
Using /home/ozlevka/tmp/terraform/ansible.cfg as config file
Parsed /home/ozlevka/tmp/terraform/hosts inventory source with ini plugin

PLAYBOOK: amazon.yml ***************************************************************************************************************************************************************************************************************************************************
1 plays in amazon.yml

PLAY [all] *************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************************************************************************************************************************************
Using module file /home/ozlevka/.virtualenv/ansible/lib/python3.6/site-packages/ansible/modules/system/setup.py
<10.0.0.51> ESTABLISH SSH CONNECTION FOR USER: ericom
<10.0.0.51> SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/home/ozlevka/mydocs/ansible"' -o User=ericom -o ConnectTimeout=10 -o ControlPath=/home/ozlevka/.ansible/cp/ff0e43f0e7 10.0.0.51 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<10.0.0.51> (0, b'/home/ericom\n', b'')
<10.0.0.51> ESTABLISH SSH CONNECTION FOR USER: ericom
<10.0.0.51> SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/home/ozlevka/mydocs/ansible"' -o User=ericom -o ConnectTimeout=10 -o ControlPath=/home/ozlevka/.ansible/cp/ff0e43f0e7 10.0.0.51 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/ericom/.ansible/tmp/ansible-tmp-1519321714.830281-79021545958925 `" && echo ansible-tmp-1519321714.830281-79021545958925="` echo /home/ericom/.ansible/tmp/ansible-tmp-1519321714.830281-79021545958925 `" ) && sleep 0'"'"''
<10.0.0.51> (0, b'ansible-tmp-1519321714.830281-79021545958925=/home/ericom/.ansible/tmp/ansible-tmp-1519321714.830281-79021545958925\n', b'')
<10.0.0.51> PUT /tmp/tmpmnmbbbhz TO /home/ericom/.ansible/tmp/ansible-tmp-1519321714.830281-79021545958925/setup.py
<10.0.0.51> SSH: EXEC sshpass -d12 sftp -o BatchMode=no -b - -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/home/ozlevka/mydocs/ansible"' -o User=ericom -o ConnectTimeout=10 -o ControlPath=/home/ozlevka/.ansible/cp/ff0e43f0e7 '[10.0.0.51]'
<10.0.0.51> (0, b'sftp> put /tmp/tmpmnmbbbhz /home/ericom/.ansible/tmp/ansible-tmp-1519321714.830281-79021545958925/setup.py\n', b'')
<10.0.0.51> ESTABLISH SSH CONNECTION FOR USER: ericom
<10.0.0.51> SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/home/ozlevka/mydocs/ansible"' -o User=ericom -o ConnectTimeout=10 -o ControlPath=/home/ozlevka/.ansible/cp/ff0e43f0e7 10.0.0.51 '/bin/sh -c '"'"'chmod u+x /home/ericom/.ansible/tmp/ansible-tmp-1519321714.830281-79021545958925/ /home/ericom/.ansible/tmp/ansible-tmp-1519321714.830281-79021545958925/setup.py && sleep 0'"'"''
<10.0.0.51> (0, b'', b'')
<10.0.0.51> ESTABLISH SSH CONNECTION FOR USER: ericom
<10.0.0.51> SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/home/ozlevka/mydocs/ansible"' -o User=ericom -o ConnectTimeout=10 -o ControlPath=/home/ozlevka/.ansible/cp/ff0e43f0e7 -tt 10.0.0.51 '/bin/sh -c '"'"'/usr/bin/python3 /home/ericom/.ansible/tmp/ansible-tmp-1519321714.830281-79021545958925/setup.py; rm -rf "/home/ericom/.ansible/tmp/ansible-tmp-1519321714.830281-79021545958925/" > /dev/null 2>&1 && sleep 0'"'"''
<10.0.0.51> (0, b'exc: \'DistributionFiles\' object has no attribute \'parse_distribution_file_Archlinux\'\r\n\r\n{"invocation": {"module_args": {"filter": "*", "fact_path": "/etc/ansible/facts.d", "gather_timeout": 10, "gather_subset": ["all"]}}, "ansible_facts": {"ansible_python": {"version": {"major": 3, "serial": 0, "minor": 5, "micro": 2, "releaselevel": "final"}, "version_info": [3, 5, 2, "final", 0], "executable": "/usr/bin/python3", "has_sslcontext": true, "type": "cpython"}, "ansible_product_serial": "NA", "ansible_local": {}, "ansible_fqdn": "ubuntu-server", "ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDDHBm74kAQGgqXrJsycVM14ASvgFxWDxkRqKt+1QH5KhwOaiICr9IhUEDNkUoahN0K7OD2RHxlOh+c3c/mPKg/J9+lDDeFf2qYpWqx4txWMG8CVpuZ4w+roqBi8Ay5hkW0A74Mdn5xmnHe2ddKyqpOM67OwszCd/GB2NNGmJb2zFmxDWCGoxMzQJdGBp0Ig1BxfFe3luC0+ukEB1A1O+nY2NHnbf2Y1FM/baYrk529fRn55GkdL1ciFf4d7hJrVGCS8jLndAMWN5aA7/9W4OyCn8V8kNe5rqvH3ER66julMMfpbQqD7sgbXrfCJwTO6vsNzKjffPqfDP9dJs9FGHx1", "ansible_processor_cores": 2, "ansible_userspace_architecture": "x86_64", "ansible_interfaces": ["enp0s3", "lo", "enp0s8"], "ansible_distribution_version": "16.04", "ansible_kernel": "4.4.0-87-generic", "ansible_processor_threads_per_core": 1, "ansible_memtotal_mb": 3951, "ansible_user_uid": 1000, "ansible_distribution_major_version": "16", "ansible_ssh_host_key_ed25519_public": "AAAAC3NzaC1lZDI1NTE5AAAAIHG4KISLW7euI7NgBw1p1mRJwMdB4XyjOzb/JEc6vxjK", "ansible_distribution": "Ubuntu", "ansible_date_time": {"weekday": "Thursday", "year": "2018", "weeknumber": "08", "iso8601": "2018-02-22T17:48:35Z", "hour": "12", "iso8601_basic_short": "20180222T124835", "iso8601_basic": "20180222T124835342389", "minute": "48", "month": "02", "iso8601_micro": "2018-02-22T17:48:35.342509Z", "date": "2018-02-22", "tz_offset": "-0500", "time": "12:48:35", "weekday_number": "4", "epoch": "1519321715", "tz": "EST", "second": "35", "day": "22"}, "ansible_real_user_id": 1000, "ansible_system_capabilities": [""], "ansible_user_shell": "/bin/bash", "ansible_memory_mb": {"swap": {"cached": 0, "total": 4095, "used": 0, "free": 4095}, "real": {"total": 3951, "used": 274, "free": 3677}, "nocache": {"used": 97, "free": 3854}}, "ansible_selinux": {"status": "Missing selinux Python library"}, "ansible_user_id": "ericom", "ansible_system_vendor": "innotek GmbH", "ansible_mounts": [{"mount": "/", "block_size": 4096, "inode_total": 1672800, "options": "rw,relatime,errors=remount-ro,data=ordered", "block_total": 6552031, "inode_used": 64999, "inode_available": 1607801, "block_available": 5821036, "block_used": 730995, "size_available": 23842963456, "uuid": "b7bad699-1069-43d5-8f49-1e81cc33d02b", "size_total": 26837118976, "fstype": "ext4", "device": "/dev/mapper/ubuntu--server--vg-root"}, {"mount": "/boot", "block_size": 1024, "inode_total": 124928, "options": "rw,relatime,block_validity,barrier,user_xattr,acl", "block_total": 482922, "inode_used": 299, "inode_available": 124629, "block_available": 399543, "block_used": 83379, "size_available": 409132032, "uuid": "83afa835-ab43-4187-aa8e-2dfc824b85ef", "size_total": 494512128, "fstype": "ext2", "device": "/dev/sda1"}], "ansible_effective_group_id": 1000, "ansible_swapfree_mb": 4095, "ansible_distribution_file_parsed": true, "ansible_form_factor": "Other", "ansible_distribution_file_variety": "Debian", "ansible_pkg_mgr": "apt", "ansible_bios_version": "VirtualBox", "ansible_all_ipv4_addresses": ["10.0.2.15", "10.0.0.51"], "ansible_product_name": "VirtualBox", "ansible_user_gid": 1000, "ansible_service_mgr": "systemd", "ansible_os_family": "Debian", "ansible_system_capabilities_enforced": "True", "ansible_processor_count": 1, "ansible_hostname": "ubuntu-server", "ansible_default_ipv6": {}, "ansible_lo": {"hw_timestamp_filters": [], "promisc": false, "active": true, "mtu": 65536, "features": {"rx_vlan_stag_filter": "off [fixed]", "tx_sit_segmentation": "off [fixed]", "ntuple_filters": "off [fixed]", "busy_poll": "off [fixed]", "generic_segmentation_offload": "on", "receive_hashing": "off [fixed]", "tx_vlan_stag_hw_insert": "off [fixed]", "udp_fragmentation_offload": "on", "tx_nocache_copy": "off [fixed]", "tx_lockless": "on [fixed]", "hw_tc_offload": "off [fixed]", "tx_tcp_ecn_segmentation": "on", "tx_ipip_segmentation": "off [fixed]", "tx_checksumming": "on", "tx_gre_segmentation": "off [fixed]", "highdma": "on [fixed]", "tx_checksum_sctp": "on [fixed]", "tx_tcp_segmentation": "on", "generic_receive_offload": "on", "vlan_challenged": "on [fixed]", "tx_checksum_fcoe_crc": "off [fixed]", "loopback": "on [fixed]", "tx_fcoe_segmentation": "off [fixed]", "large_receive_offload": "off [fixed]", "rx_vlan_filter": "off [fixed]", "rx_fcs": "off [fixed]", "tcp_segmentation_offload": "on", "fcoe_mtu": "off [fixed]", "tx_gso_robust": "off [fixed]", "tx_tcp6_segmentation": "on", "tx_checksum_ipv6": "off [fixed]", "tx_checksum_ipv4": "off [fixed]", "scatter_gather": "on", "rx_all": "off [fixed]", "rx_vlan_stag_hw_parse": "off [fixed]", "tx_scatter_gather": "on [fixed]", "rx_checksumming": "on [fixed]", "rx_vlan_offload": "off [fixed]", "tx_checksum_ip_generic": "on [fixed]", "netns_local": "on [fixed]", "l2_fwd_offload": "off [fixed]", "tx_udp_tnl_segmentation": "off [fixed]", "tx_scatter_gather_fraglist": "on [fixed]", "tx_vlan_offload": "off [fixed]"}, "timestamping": ["rx_software", "software"], "ipv6": [{"prefix": "128", "address": "::1", "scope": "host"}], "type": "loopback", "ipv4": {"network": "127.0.0.0", "address": "127.0.0.1", "broadcast": "host", "netmask": "255.0.0.0"}, "device": "lo"}, "ansible_effective_user_id": 1000, "ansible_swaptotal_mb": 4095, "ansible_device_links": {"labels": {}, "uuids": {"dm-0": ["b7bad699-1069-43d5-8f49-1e81cc33d02b"], "dm-1": ["4d619cea-c6cb-42a5-bb92-43c632f15b94"], "sda1": ["83afa835-ab43-4187-aa8e-2dfc824b85ef"]}, "masters": {"sda5": ["dm-0", "dm-1"]}, "ids": {"sda1": ["ata-VBOX_HARDDISK_VBb4ccc466-56b4c31e-part1"], "sda2": ["ata-VBOX_HARDDISK_VBb4ccc466-56b4c31e-part2"], "sr0": ["ata-VBOX_CD-ROM_VB2-01700376"], "sda5": ["ata-VBOX_HARDDISK_VBb4ccc466-56b4c31e-part5", "lvm-pv-uuid-2RiTcS-mcfF-hbGP-pCJV-UM2o-G0YP-ConUd5"], "sda": ["ata-VBOX_HARDDISK_VBb4ccc466-56b4c31e"], "dm-0": ["dm-name-ubuntu--server--vg-root", "dm-uuid-LVM-D5PhzgBMZSMnhcaPqhD9mDJxJAeyS6We7HHxcN33SEpvy7REkSQwsZ0pGZjEnQjr"], "dm-1": ["dm-name-ubuntu--server--vg-swap_1", "dm-uuid-LVM-D5PhzgBMZSMnhcaPqhD9mDJxJAeyS6Wej2e7m4HsmAbb6sm9HXHRmQKEvkfkjlKc"]}}, "ansible_userspace_bits": "64", "ansible_system": "Linux", "ansible_selinux_python_present": false, "ansible_processor_vcpus": 2, "ansible_user_gecos": "Ericom Software,,,", "ansible_env": {"LC_MONETARY": "he_IL.UTF-8", "SHLVL": "1", "MAIL": "/var/mail/ericom", "SSH_CLIENT": "10.0.0.1 23742 22", "LC_PAPER": "he_IL.UTF-8", "LC_MESSAGES": "C", "LC_TELEPHONE": "he_IL.UTF-8", "LC_MEASUREMENT": "he_IL.UTF-8", "LOGNAME": "ericom", "LANG": "C", "XDG_RUNTIME_DIR": "/run/user/1000", "PWD": "/home/ericom", "LC_ADDRESS": "he_IL.UTF-8", "LC_NAME": "he_IL.UTF-8", "PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games", "LC_IDENTIFICATION": "he_IL.UTF-8", "_": "/bin/sh", "SSH_TTY": "/dev/pts/0", "TERM": "xterm-256color", "SHELL": "/bin/bash", "USER": "ericom", "LC_TIME": "en_US.UTF-8", "HOME": "/home/ericom", "SSH_CONNECTION": "10.0.0.1 23742 10.0.0.51 22", "LC_ALL": "C", "XDG_SESSION_ID": "1", "LC_NUMERIC": "he_IL.UTF-8"}, "ansible_processor": ["0", "GenuineIntel", "Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz", "1", "GenuineIntel", "Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz"], "ansible_product_uuid": "NA", "ansible_virtualization_role": "guest", "ansible_lsb": {"codename": "xenial", "description": "Ubuntu 16.04.3 LTS", "major_release": "16", "release": "16.04", "id": "Ubuntu"}, "ansible_apparmor": {"status": "enabled"}, "ansible_architecture": "x86_64", "ansible_all_ipv6_addresses": ["fe80::a00:27ff:fea8:85ff", "fe80::a00:27ff:fe06:480b"], "ansible_product_version": "1.2", "ansible_python_version": "3.5.2", "ansible_dns": {"nameservers": ["10.0.2.3"]}, "ansible_machine_id": "05d881b5a59065f25befb2da5a23e982", "ansible_real_group_id": 1000, "ansible_cmdline": {"ro": true, "root": "/dev/mapper/ubuntu--server--vg-root", "BOOT_IMAGE": "/vmlinuz-4.4.0-87-generic"}, "gather_subset": ["all"], "ansible_default_ipv4": {"network": "10.0.2.0", "macaddress": "08:00:27:a8:85:ff", "gateway": "10.0.2.2", "netmask": "255.255.255.0", "alias": "enp0s3", "address": "10.0.2.15", "broadcast": "10.0.2.255", "type": "ether", "mtu": 1500, "interface": "enp0s3"}, "ansible_machine": "x86_64", "ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNEHMN3K68HIeKzmlnHphiJtpqtcPQAP4h0gRrSlqvPpKsQ75fjo99fPAD4SlQnb8rqztAuQgbAg71lJrSRp6R8=", "ansible_virtualization_type": "virtualbox", "ansible_domain": "", "ansible_distribution_release": "xenial", "module_setup": true, "ansible_uptime_seconds": 393, "ansible_distribution_file_path": "/etc/os-release", "ansible_enp0s3": {"hw_timestamp_filters": [], "macaddress": "08:00:27:a8:85:ff", "features": {"rx_vlan_stag_filter": "off [fixed]", "tx_sit_segmentation": "off [fixed]", "ntuple_filters": "off [fixed]", "busy_poll": "off [fixed]", "generic_segmentation_offload": "on", "receive_hashing": "off [fixed]", "tx_vlan_stag_hw_insert": "off [fixed]", "udp_fragmentation_offload": "off [fixed]", "tx_nocache_copy": "off", "tx_lockless": "off [fixed]", "hw_tc_offload": "off [fixed]", "tx_tcp_ecn_segmentation": "off [fixed]", "tx_ipip_segmentation": "off [fixed]", "tx_checksumming": "on", "tx_gre_segmentation": "off [fixed]", "highdma": "off [fixed]", "tx_checksum_sctp": "off [fixed]", "tx_tcp_segmentation": "on", "generic_receive_offload": "on", "vlan_challenged": "off [fixed]", "tx_checksum_fcoe_crc": "off [fixed]", "loopback": "off [fixed]", "tx_fcoe_segmentation": "off [fixed]", "large_receive_offload": "off [fixed]", "rx_vlan_filter": "on [fixed]", "rx_fcs": "off", "tcp_segmentation_offload": "on", "fcoe_mtu": "off [fixed]", "tx_gso_robust": "off [fixed]", "tx_tcp6_segmentation": "off [fixed]", "tx_checksum_ipv6": "off [fixed]", "tx_checksum_ipv4": "off [fixed]", "scatter_gather": "on", "rx_all": "off", "rx_vlan_stag_hw_parse": "off [fixed]", "tx_scatter_gather": "on", "rx_checksumming": "off", "rx_vlan_offload": "on", "tx_checksum_ip_generic": "on", "netns_local": "off [fixed]", "l2_fwd_offload": "off [fixed]", "tx_udp_tnl_segmentation": "off [fixed]", "tx_scatter_gather_fraglist": "off [fixed]", "tx_vlan_offload": "on [fixed]"}, "timestamping": ["tx_software", "rx_software", "software"], "speed": 1000, "promisc": false, "mtu": 1500, "type": "ether", "ipv6": [{"prefix": "64", "address": "fe80::a00:27ff:fea8:85ff", "scope": "link"}], "active": true, "ipv4": {"network": "10.0.2.0", "address": "10.0.2.15", "broadcast": "10.0.2.255", "netmask": "255.255.255.0"}, "pciid": "0000:00:03.0", "module": "e1000", "device": "enp0s3"}, "ansible_enp0s8": {"hw_timestamp_filters": [], "macaddress": "08:00:27:06:48:0b", "features": {"rx_vlan_stag_filter": "off [fixed]", "tx_sit_segmentation": "off [fixed]", "ntuple_filters": "off [fixed]", "busy_poll": "off [fixed]", "generic_segmentation_offload": "on", "receive_hashing": "off [fixed]", "tx_vlan_stag_hw_insert": "off [fixed]", "udp_fragmentation_offload": "off [fixed]", "tx_nocache_copy": "off", "tx_lockless": "off [fixed]", "hw_tc_offload": "off [fixed]", "tx_tcp_ecn_segmentation": "off [fixed]", "tx_ipip_segmentation": "off [fixed]", "tx_checksumming": "on", "tx_gre_segmentation": "off [fixed]", "highdma": "off [fixed]", "tx_checksum_sctp": "off [fixed]", "tx_tcp_segmentation": "on", "generic_receive_offload": "on", "vlan_challenged": "off [fixed]", "tx_checksum_fcoe_crc": "off [fixed]", "loopback": "off [fixed]", "tx_fcoe_segmentation": "off [fixed]", "large_receive_offload": "off [fixed]", "rx_vlan_filter": "on [fixed]", "rx_fcs": "off", "tcp_segmentation_offload": "on", "fcoe_mtu": "off [fixed]", "tx_gso_robust": "off [fixed]", "tx_tcp6_segmentation": "off [fixed]", "tx_checksum_ipv6": "off [fixed]", "tx_checksum_ipv4": "off [fixed]", "scatter_gather": "on", "rx_all": "off", "rx_vlan_stag_hw_parse": "off [fixed]", "tx_scatter_gather": "on", "rx_checksumming": "off", "rx_vlan_offload": "on", "tx_checksum_ip_generic": "on", "netns_local": "off [fixed]", "l2_fwd_offload": "off [fixed]", "tx_udp_tnl_segmentation": "off [fixed]", "tx_scatter_gather_fraglist": "off [fixed]", "tx_vlan_offload": "on [fixed]"}, "timestamping": ["tx_software", "rx_software", "software"], "speed": 1000, "promisc": false, "mtu": 1500, "type": "ether", "ipv6": [{"prefix": "64", "address": "fe80::a00:27ff:fe06:480b", "scope": "link"}], "active": true, "ipv4": {"network": "10.0.0.0", "address": "10.0.0.51", "broadcast": "10.0.0.255", "netmask": "255.255.255.0"}, "pciid": "0000:00:08.0", "module": "e1000", "device": "enp0s8"}, "ansible_fips": false, "ansible_nodename": "ubuntu-server", "ansible_memfree_mb": 3677, "ansible_ssh_host_key_dsa_public": "AAAAB3NzaC1kc3MAAACBALwasqTVn/dujbCCc6sDiftTK4z7jIVBL3GzkKnVpHMVYm2UKr78MN+GCkJaS+UYGC8HDL4vPZ9NObDZC5ya7H4pv0Ec0YPAoddk+x+TbomrpTOQTxwnor67VOjWh1O2KlJssSegXnXJww2ndgAfoXL3U4RwyWK76ewjgjNZ3577AAAAFQCdAwrza2Tsq7wSwjuVM1sebq5KbwAAAIBBN7skU4CEzFfBcsn6PqhAScoYTBzLQhD716dC/Id3ugIFk32HokjHH2ZukQzWs3UUF2wEJgYh70rxjOaK4wKMFoPY2nfdf7HD19KuiVajSwR5mO8DXczbs0UCJRwF1/b/eFLWctV0UGoV6W1Y+foXLNWldUcZnSFUXQOkO8GfsAAAAIAjDfcWRUHI2s9j7L02greTENiuBAn4rC1xITPwqV9PmO0AnaVLkI6649QSQ4uyIznrRA0wqHPS7qyLAweDDs1JKy6o/2+BcZ7okOpWjjySh1CH2SWg95j5Z50J0Vvv11T1WdN5OccOR7bJ7D+ESAop93QZOK91l9hthPK6G6k+ig==", "ansible_user_dir": "/home/ericom", "ansible_devices": {"sr0": {"partitions": {}, "removable": "1", "size": "1024.00 MB", "vendor": "VBOX", "links": {"uuids": [], "labels": [], "masters": [], "ids": ["ata-VBOX_CD-ROM_VB2-01700376"]}, "host": "IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)", "holders": [], "sectors": "2097151", "virtual": 1, "sas_address": null, "scheduler_mode": "deadline", "model": "CD-ROM", "support_discard": "0", "sectorsize": "512", "rotational": "1", "sas_device_handle": null}, "sda": {"partitions": {"sda1": {"sectors": "997376", "uuid": "83afa835-ab43-4187-aa8e-2dfc824b85ef", "start": "2048", "size": "487.00 MB", "sectorsize": 512, "links": {"uuids": ["83afa835-ab43-4187-aa8e-2dfc824b85ef"], "labels": [], "masters": [], "ids": ["ata-VBOX_HARDDISK_VBb4ccc466-56b4c31e-part1"]}, "holders": []}, "sda2": {"sectors": "2", "uuid": null, "start": "1001470", "size": "1.00 KB", "sectorsize": 512, "links": {"uuids": [], "labels": [], "masters": [], "ids": ["ata-VBOX_HARDDISK_VBb4ccc466-56b4c31e-part2"]}, "holders": []}, "sda5": {"sectors": "61911040", "uuid": null, "start": "1001472", "size": "29.52 GB", "sectorsize": 512, "links": {"uuids": [], "labels": [], "masters": ["dm-0", "dm-1"], "ids": ["ata-VBOX_HARDDISK_VBb4ccc466-56b4c31e-part5", "lvm-pv-uuid-2RiTcS-mcfF-hbGP-pCJV-UM2o-G0YP-ConUd5"]}, "holders": ["ubuntu--server--vg-root", "ubuntu--server--vg-swap_1"]}}, "removable": "0", "size": "30.00 GB", "vendor": "ATA", "links": {"uuids": [], "labels": [], "masters": [], "ids": ["ata-VBOX_HARDDISK_VBb4ccc466-56b4c31e"]}, "host": "SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (rev 02)", "holders": [], "sectors": "62914560", "virtual": 1, "sas_address": null, "scheduler_mode": "deadline", "model": "VBOX HARDDISK", "support_discard": "0", "sectorsize": "512", "rotational": "1", "sas_device_handle": null}, "loop4": {"partitions": {}, "removable": "0", "size": "0.00 Bytes", "vendor": null, "links": {"uuids": [], "labels": [], "masters": [], "ids": []}, "host": "", "holders": [], "sectors": "0", "virtual": 1, "sas_address": null, "scheduler_mode": "", "model": null, "support_discard": "0", "sectorsize": "512", "rotational": "1", "sas_device_handle": null}, "loop1": {"partitions": {}, "removable": "0", "size": "0.00 Bytes", "vendor": null, "links": {"uuids": [], "labels": [], "masters": [], "ids": []}, "host": "", "holders": [], "sectors": "0", "virtual": 1, "sas_address": null, "scheduler_mode": "", "model": null, "support_discard": "0", "sectorsize": "512", "rotational": "1", "sas_device_handle": null}, "dm-1": {"partitions": {}, "removable": "0", "size": "4.00 GB", "vendor": null, "links": {"uuids": ["4d619cea-c6cb-42a5-bb92-43c632f15b94"], "labels": [], "masters": [], "ids": ["dm-name-ubuntu--server--vg-swap_1", "dm-uuid-LVM-D5PhzgBMZSMnhcaPqhD9mDJxJAeyS6Wej2e7m4HsmAbb6sm9HXHRmQKEvkfkjlKc"]}, "host": "", "holders": [], "sectors": "8388608", "virtual": 1, "sas_address": null, "scheduler_mode": "", "model": null, "support_discard": "0", "sectorsize": "512", "rotational": "1", "sas_device_handle": null}, "loop3": {"partitions": {}, "removable": "0", "size": "0.00 Bytes", "vendor": null, "links": {"uuids": [], "labels": [], "masters": [], "ids": []}, "host": "", "holders": [], "sectors": "0", "virtual": 1, "sas_address": null, "scheduler_mode": "", "model": null, "support_discard": "0", "sectorsize": "512", "rotational": "1", "sas_device_handle": null}, "loop5": {"partitions": {}, "removable": "0", "size": "0.00 Bytes", "vendor": null, "links": {"uuids": [], "labels": [], "masters": [], "ids": []}, "host": "", "holders": [], "sectors": "0", "virtual": 1, "sas_address": null, "scheduler_mode": "", "model": null, "support_discard": "0", "sectorsize": "512", "rotational": "1", "sas_device_handle": null}, "loop2": {"partitions": {}, "removable": "0", "size": "0.00 Bytes", "vendor": null, "links": {"uuids": [], "labels": [], "masters": [], "ids": []}, "host": "", "holders": [], "sectors": "0", "virtual": 1, "sas_address": null, "scheduler_mode": "", "model": null, "support_discard": "0", "sectorsize": "512", "rotational": "1", "sas_device_handle": null}, "loop7": {"partitions": {}, "removable": "0", "size": "0.00 Bytes", "vendor": null, "links": {"uuids": [], "labels": [], "masters": [], "ids": []}, "host": "", "holders": [], "sectors": "0", "virtual": 1, "sas_address": null, "scheduler_mode": "", "model": null, "support_discard": "0", "sectorsize": "512", "rotational": "1", "sas_device_handle": null}, "loop6": {"partitions": {}, "removable": "0", "size": "0.00 Bytes", "vendor": null, "links": {"uuids": [], "labels": [], "masters": [], "ids": []}, "host": "", "holders": [], "sectors": "0", "virtual": 1, "sas_address": null, "scheduler_mode": "", "model": null, "support_discard": "0", "sectorsize": "512", "rotational": "1", "sas_device_handle": null}, "loop0": {"partitions": {}, "removable": "0", "size": "0.00 Bytes", "vendor": null, "links": {"uuids": [], "labels": [], "masters": [], "ids": []}, "host": "", "holders": [], "sectors": "0", "virtual": 1, "sas_address": null, "scheduler_mode": "", "model": null, "support_discard": "0", "sectorsize": "512", "rotational": "1", "sas_device_handle": null}, "dm-0": {"partitions": {}, "removable": "0", "size": "25.52 GB", "vendor": null, "links": {"uuids": ["b7bad699-1069-43d5-8f49-1e81cc33d02b"], "labels": [], "masters": [], "ids": ["dm-name-ubuntu--server--vg-root", "dm-uuid-LVM-D5PhzgBMZSMnhcaPqhD9mDJxJAeyS6We7HHxcN33SEpvy7REkSQwsZ0pGZjEnQjr"]}, "host": "", "holders": [], "sectors": "53518336", "virtual": 1, "sas_address": null, "scheduler_mode": "", "model": null, "support_discard": "0", "sectorsize": "512", "rotational": "1", "sas_device_handle": null}}, "ansible_bios_date": "12/01/2006"}}\r\n', b'Shared connection to 10.0.0.51 closed.\r\n')
ok: [first]
META: ran handlers

TASK [Test 1] **********************************************************************************************************************************************************************************************************************************************************
task path: /home/ozlevka/tmp/terraform/amazon.yml:7
Using module file /home/ozlevka/.virtualenv/ansible/lib/python3.6/site-packages/ansible/modules/packaging/os/apt.py
<10.0.0.51> ESTABLISH SSH CONNECTION FOR USER: ericom
<10.0.0.51> SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/home/ozlevka/mydocs/ansible"' -o User=ericom -o ConnectTimeout=10 -o ControlPath=/home/ozlevka/.ansible/cp/ff0e43f0e7 10.0.0.51 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<10.0.0.51> (0, b'/home/ericom\n', b'')
<10.0.0.51> ESTABLISH SSH CONNECTION FOR USER: ericom
<10.0.0.51> SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/home/ozlevka/mydocs/ansible"' -o User=ericom -o ConnectTimeout=10 -o ControlPath=/home/ozlevka/.ansible/cp/ff0e43f0e7 10.0.0.51 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /home/ericom/.ansible/tmp/ansible-tmp-1519321715.7734492-138469256991651 `" && echo ansible-tmp-1519321715.7734492-138469256991651="` echo /home/ericom/.ansible/tmp/ansible-tmp-1519321715.7734492-138469256991651 `" ) && sleep 0'"'"''
<10.0.0.51> (0, b'ansible-tmp-1519321715.7734492-138469256991651=/home/ericom/.ansible/tmp/ansible-tmp-1519321715.7734492-138469256991651\n', b'')
<10.0.0.51> PUT /tmp/tmp5a8wj2y3 TO /home/ericom/.ansible/tmp/ansible-tmp-1519321715.7734492-138469256991651/apt.py
<10.0.0.51> SSH: EXEC sshpass -d12 sftp -o BatchMode=no -b - -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/home/ozlevka/mydocs/ansible"' -o User=ericom -o ConnectTimeout=10 -o ControlPath=/home/ozlevka/.ansible/cp/ff0e43f0e7 '[10.0.0.51]'
<10.0.0.51> (0, b'sftp> put /tmp/tmp5a8wj2y3 /home/ericom/.ansible/tmp/ansible-tmp-1519321715.7734492-138469256991651/apt.py\n', b'')
<10.0.0.51> PUT /tmp/tmpgcbvisy9 TO /home/ericom/.ansible/tmp/ansible-tmp-1519321715.7734492-138469256991651/async_wrapper.py
<10.0.0.51> SSH: EXEC sshpass -d12 sftp -o BatchMode=no -b - -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/home/ozlevka/mydocs/ansible"' -o User=ericom -o ConnectTimeout=10 -o ControlPath=/home/ozlevka/.ansible/cp/ff0e43f0e7 '[10.0.0.51]'
<10.0.0.51> (0, b'sftp> put /tmp/tmpgcbvisy9 /home/ericom/.ansible/tmp/ansible-tmp-1519321715.7734492-138469256991651/async_wrapper.py\n', b'')
<10.0.0.51> ESTABLISH SSH CONNECTION FOR USER: ericom
<10.0.0.51> SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/home/ozlevka/mydocs/ansible"' -o User=ericom -o ConnectTimeout=10 -o ControlPath=/home/ozlevka/.ansible/cp/ff0e43f0e7 10.0.0.51 '/bin/sh -c '"'"'chmod u+x /home/ericom/.ansible/tmp/ansible-tmp-1519321715.7734492-138469256991651/ /home/ericom/.ansible/tmp/ansible-tmp-1519321715.7734492-138469256991651/apt.py /home/ericom/.ansible/tmp/ansible-tmp-1519321715.7734492-138469256991651/async_wrapper.py && sleep 0'"'"''
<10.0.0.51> (0, b'', b'')
<10.0.0.51> ESTABLISH SSH CONNECTION FOR USER: ericom
<10.0.0.51> SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/home/ozlevka/mydocs/ansible"' -o User=ericom -o ConnectTimeout=10 -o ControlPath=/home/ozlevka/.ansible/cp/ff0e43f0e7 -tt 10.0.0.51 '/bin/sh -c '"'"'/usr/bin/python /home/ericom/.ansible/tmp/ansible-tmp-1519321715.7734492-138469256991651/async_wrapper.py 756901964326 1000 /home/ericom/.ansible/tmp/ansible-tmp-1519321715.7734492-138469256991651/apt.py _ && sleep 0'"'"''
<10.0.0.51> (127, b'/bin/sh: 1: /usr/bin/python: not found\r\n', b'Shared connection to 10.0.0.51 closed.\r\n')
<10.0.0.51> ESTABLISH SSH CONNECTION FOR USER: ericom
<10.0.0.51> SSH: EXEC sshpass -d12 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/home/ozlevka/mydocs/ansible"' -o User=ericom -o ConnectTimeout=10 -o ControlPath=/home/ozlevka/.ansible/cp/ff0e43f0e7 10.0.0.51 '/bin/sh -c '"'"'rm -f -r /home/ericom/.ansible/tmp/ansible-tmp-1519321715.7734492-138469256991651/ > /dev/null 2>&1 && sleep 0'"'"''
<10.0.0.51> (0, b'', b'')
fatal: [first]: FAILED! => {
    "changed": true,
    "module_stderr": "Shared connection to 10.0.0.51 closed.\r\n",
    "module_stdout": "/bin/sh: 1: /usr/bin/python: not found\r\n",
    "msg": "MODULE FAILURE",
    "rc": 127
}
        to retry, use: --limit @/home/ozlevka/tmp/terraform/amazon.retry

PLAY RECAP *************************************************************************************************************************************************************************************************************************************************************
first                      : ok=1    changed=0    unreachable=0    failed=1   

@sivel
Copy link
Member

sivel commented Feb 22, 2018

@ozlevka-ericom thank you for the update. I'll continue to investigate the cause to this.

@sivel
Copy link
Member

sivel commented Feb 22, 2018

@ozlevka-ericom I've just confirmed that the PR that closed this issue, does in fact resolve the problem

The fix will be included in ansible 2.4.4, 2.5.0, and 2.6.0

@ansibot ansibot added the bug This issue/PR relates to a bug. label Mar 8, 2018
@ansible ansible locked and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. has_pr This issue has an associated PR. module This issue/PR relates to a module. needs_info This issue requires further information. Please answer any outstanding questions. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants