{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/16938","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/16938/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/16938/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/16938/events","html_url":"https://github.com/ansible/ansible/issues/16938","id":169174457,"number":16938,"title":"ansible_python_interpreter ignored in 2.1.1.0","user":{"login":"2bithacker","id":1847654,"avatar_url":"https://avatars.githubusercontent.com/u/1847654?v=3","gravatar_id":"","url":"https://api.github.com/users/2bithacker","html_url":"https://github.com/2bithacker","followers_url":"https://api.github.com/users/2bithacker/followers","following_url":"https://api.github.com/users/2bithacker/following{/other_user}","gists_url":"https://api.github.com/users/2bithacker/gists{/gist_id}","starred_url":"https://api.github.com/users/2bithacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2bithacker/subscriptions","organizations_url":"https://api.github.com/users/2bithacker/orgs","repos_url":"https://api.github.com/users/2bithacker/repos","events_url":"https://api.github.com/users/2bithacker/events{/privacy}","received_events_url":"https://api.github.com/users/2bithacker/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible/labels/needs_info","name":"needs_info","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-03T16:25:51Z","updated_at":"2016-08-05T19:27:54Z","closed_at":null,"body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from “ansible --version” between quotes below -->\r\n```\r\nansible 2.1.1.0\r\n  config file = /Users/chip/Personal/ansible/ansible.cfg\r\n  configured module search path = Default w/o overrides\r\n```\r\n\r\n##### CONFIGURATION\r\n<!---\r\nMention any settings you have changed/added/removed in ansible.cfg\r\n(or using the ANSIBLE_* environment variables).\r\n-->\r\n```\r\n[defaults]\r\ngathering = smart\r\nfact_caching = jsonfile\r\nfact_caching_connection = /tmp/cachedir\r\nfact_caching_timeout = 86400\r\nansible_managed = Ansible managed, do not edit directly! --- {uid}@{host}\r\ninventory = inventory\r\nvault_password_file = ~/.vaultpass\r\nretry_files_enabled = false\r\ncommand_warnings = false\r\n```\r\n\r\n##### OS / ENVIRONMENT\r\n<!---\r\nMention the OS you are running Ansible from, and the OS you are\r\nmanaging, or say “N/A” for anything that is not platform-specific.\r\n-->\r\nRunning Ansible on Mac OS X 10.11.6\r\nManaging a variety of hosts, but mostly FreeBSD 10.3-RELEASE\r\n\r\n##### SUMMARY\r\n<!--- Explain the problem briefly -->\r\nI upgraded Ansible to 2.1.1.0 via homebrew, and can no longer run commands on my remote systems. I have ansible_python_interpreter set in a vars file, which was working fine prior to the update.\r\n\r\n\r\n##### STEPS TO REPRODUCE\r\n<!---\r\nFor bugs, show exactly how to reproduce the problem.\r\nFor new features, show how the feature would be used.\r\n-->\r\n\r\n<!--- Paste example playbooks or commands between quotes below -->\r\n`group_vars/all/python`:\r\n```\r\n---\r\nansible_python_interpreter: /usr/bin/env python2.7\r\n```\r\n\r\n\r\n<!--- You can also paste gist.github.com links for larger files -->\r\n\r\n##### EXPECTED RESULTS\r\n<!--- What did you expect to happen when running the steps above? -->\r\nI expect Ansible to use the specified Python path as it did before 2.1.1.0.\r\n\r\n##### ACTUAL RESULTS\r\n<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->\r\nAnsible does not use the defined Python path, instead using it's default.\r\n<!--- Paste verbatim command output between quotes below -->\r\n```\r\n> ansible ca-tor01.2bit.co -m setup\r\nca-tor01.2bit.co | FAILED! => {\r\n    \"changed\": false,\r\n    \"failed\": true,\r\n    \"module_stderr\": \"\",\r\n    \"module_stdout\": \"/usr/bin/python: not found\\r\\n\",\r\n    \"msg\": \"MODULE FAILURE\",\r\n    \"parsed\": false\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/237941320","html_url":"https://github.com/ansible/ansible/issues/16938#issuecomment-237941320","issue_url":"https://api.github.com/repos/ansible/ansible/issues/16938","id":237941320,"user":{"login":"2bithacker","id":1847654,"avatar_url":"https://avatars.githubusercontent.com/u/1847654?v=3","gravatar_id":"","url":"https://api.github.com/users/2bithacker","html_url":"https://github.com/2bithacker","followers_url":"https://api.github.com/users/2bithacker/followers","following_url":"https://api.github.com/users/2bithacker/following{/other_user}","gists_url":"https://api.github.com/users/2bithacker/gists{/gist_id}","starred_url":"https://api.github.com/users/2bithacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2bithacker/subscriptions","organizations_url":"https://api.github.com/users/2bithacker/orgs","repos_url":"https://api.github.com/users/2bithacker/repos","events_url":"https://api.github.com/users/2bithacker/events{/privacy}","received_events_url":"https://api.github.com/users/2bithacker/received_events","type":"User","site_admin":false},"created_at":"2016-08-05T19:27:54Z","updated_at":"2016-08-05T19:27:54Z","body":"Here's the -vvvv output:\r\n```\r\n> ansible sumo.2bithacker.net -m setup -vvvv\r\nUsing /Users/chip/Personal/ansible/ansible.cfg as config file\r\nLoaded callback minimal of type stdout, v2.0\r\n<sumo.2bithacker.net> ESTABLISH SSH CONNECTION FOR USER: None\r\n<sumo.2bithacker.net> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/chip/.ansible/cp/ansible-ssh-%h-%p-%r sumo.2bithacker.net '/bin/sh -c '\"'\"'( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1470425038.28-241804982200680 `\" && echo ansible-tmp-1470425038.28-241804982200680=\"` echo $HOME/.ansible/tmp/ansible-tmp-1470425038.28-241804982200680 `\" ) && sleep 0'\"'\"''\r\n<sumo.2bithacker.net> PUT /var/folders/4g/sx9qxh_j2ksd17rwnh8yxjrw0000gn/T/tmpQgfVbJ TO /home/chip/.ansible/tmp/ansible-tmp-1470425038.28-241804982200680/setup\r\n<sumo.2bithacker.net> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/chip/.ansible/cp/ansible-ssh-%h-%p-%r '[sumo.2bithacker.net]'\r\n<sumo.2bithacker.net> ESTABLISH SSH CONNECTION FOR USER: None\r\n<sumo.2bithacker.net> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/chip/.ansible/cp/ansible-ssh-%h-%p-%r -tt sumo.2bithacker.net '/bin/sh -c '\"'\"'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/chip/.ansible/tmp/ansible-tmp-1470425038.28-241804982200680/setup; rm -rf \"/home/chip/.ansible/tmp/ansible-tmp-1470425038.28-241804982200680/\" > /dev/null 2>&1 && sleep 0'\"'\"''\r\nsumo.2bithacker.net | FAILED! => {\r\n    \"changed\": false,\r\n    \"failed\": true,\r\n    \"invocation\": {\r\n        \"module_name\": \"setup\"\r\n    },\r\n    \"module_stderr\": \"OpenSSH_7.3p1, OpenSSL 1.0.2h  3 May 2016\\r\\ndebug1: Reading configuration data /Users/chip/.ssh/config\\r\\ndebug3: kex names ok: [diffie-hellman-group1-sha1]\\r\\ndebug1: /Users/chip/.ssh/config line 8: Deprecated option \\\"useroaming\\\"\\r\\ndebug1: /Users/chip/.ssh/config line 10: Applying options for *\\r\\ndebug1: /Users/chip/.ssh/config line 16: Applying options for *.2bithacker.net\\r\\ndebug1: Reading configuration data /usr/local/etc/ssh/ssh_config\\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 = 54841\\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 sumo.2bithacker.net closed.\\r\\n\",\r\n    \"module_stdout\": \"/usr/bin/python: not found\\r\\n\",\r\n    \"msg\": \"MODULE FAILURE\",\r\n    \"parsed\": false\r\n}\r\n```\r\n\r\nI changed my ansible_python_interpreter to not contain a space, and the problem persists.\r\n\r\n```\r\ndiff --git a/group_vars/all/python b/group_vars/all/python\r\nindex 1fe1db6..ae57dc8 100644\r\n--- a/group_vars/all/python\r\n+++ b/group_vars/all/python\r\n@@ -1,2 +1,2 @@\r\n ---\r\n-ansible_python_interpreter: /usr/bin/env python2.7\r\n+ansible_python_interpreter: /usr/local/bin/python2.7\r\n```\r\n\r\nand a -vvvv run with that option in place:\r\n```\r\n> ansible sumo.2bithacker.net -m setup -vvvv\r\nUsing /Users/chip/Personal/ansible/ansible.cfg as config file\r\nLoaded callback minimal of type stdout, v2.0\r\n<sumo.2bithacker.net> ESTABLISH SSH CONNECTION FOR USER: None\r\n<sumo.2bithacker.net> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/chip/.ansible/cp/ansible-ssh-%h-%p-%r sumo.2bithacker.net '/bin/sh -c '\"'\"'( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1470425190.8-260657531876346 `\" && echo ansible-tmp-1470425190.8-260657531876346=\"` echo $HOME/.ansible/tmp/ansible-tmp-1470425190.8-260657531876346 `\" ) && sleep 0'\"'\"''\r\n<sumo.2bithacker.net> PUT /var/folders/4g/sx9qxh_j2ksd17rwnh8yxjrw0000gn/T/tmpIyWFG5 TO /home/chip/.ansible/tmp/ansible-tmp-1470425190.8-260657531876346/setup\r\n<sumo.2bithacker.net> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/chip/.ansible/cp/ansible-ssh-%h-%p-%r '[sumo.2bithacker.net]'\r\n<sumo.2bithacker.net> ESTABLISH SSH CONNECTION FOR USER: None\r\n<sumo.2bithacker.net> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/Users/chip/.ansible/cp/ansible-ssh-%h-%p-%r -tt sumo.2bithacker.net '/bin/sh -c '\"'\"'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/chip/.ansible/tmp/ansible-tmp-1470425190.8-260657531876346/setup; rm -rf \"/home/chip/.ansible/tmp/ansible-tmp-1470425190.8-260657531876346/\" > /dev/null 2>&1 && sleep 0'\"'\"''\r\nsumo.2bithacker.net | FAILED! => {\r\n    \"changed\": false,\r\n    \"failed\": true,\r\n    \"invocation\": {\r\n        \"module_name\": \"setup\"\r\n    },\r\n    \"module_stderr\": \"OpenSSH_7.3p1, OpenSSL 1.0.2h  3 May 2016\\r\\ndebug1: Reading configuration data /Users/chip/.ssh/config\\r\\ndebug3: kex names ok: [diffie-hellman-group1-sha1]\\r\\ndebug1: /Users/chip/.ssh/config line 8: Deprecated option \\\"useroaming\\\"\\r\\ndebug1: /Users/chip/.ssh/config line 10: Applying options for *\\r\\ndebug1: /Users/chip/.ssh/config line 16: Applying options for *.2bithacker.net\\r\\ndebug1: Reading configuration data /usr/local/etc/ssh/ssh_config\\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 = 55016\\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 sumo.2bithacker.net closed.\\r\\n\",\r\n    \"module_stdout\": \"/usr/bin/python: not found\\r\\n\",\r\n    \"msg\": \"MODULE FAILURE\",\r\n    \"parsed\": false\r\n}\r\n```\r\n\r\nEither setting for ansible_python_interpreter is working fine with 2.1.0.0."}}
{"actor":{"display_login":"2bithacker"}}