{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/16059","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/16059/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/16059/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/16059/events","html_url":"https://github.com/ansible/ansible/issues/16059","id":157583405,"number":16059,"title":"local_action does not work properly","user":{"login":"falmp","id":94873,"avatar_url":"https://avatars.githubusercontent.com/u/94873?v=3","gravatar_id":"","url":"https://api.github.com/users/falmp","html_url":"https://github.com/falmp","followers_url":"https://api.github.com/users/falmp/followers","following_url":"https://api.github.com/users/falmp/following{/other_user}","gists_url":"https://api.github.com/users/falmp/gists{/gist_id}","starred_url":"https://api.github.com/users/falmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/falmp/subscriptions","organizations_url":"https://api.github.com/users/falmp/orgs","repos_url":"https://api.github.com/users/falmp/repos","events_url":"https://api.github.com/users/falmp/events{/privacy}","received_events_url":"https://api.github.com/users/falmp/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/P2","name":"P2","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ansible/ansible/milestones/6","html_url":"https://github.com/ansible/ansible/milestones/stable-2.1","labels_url":"https://api.github.com/repos/ansible/ansible/milestones/6/labels","id":995714,"number":6,"title":"stable-2.1","description":"","creator":{"login":"abadger","id":209242,"avatar_url":"https://avatars.githubusercontent.com/u/209242?v=3","gravatar_id":"","url":"https://api.github.com/users/abadger","html_url":"https://github.com/abadger","followers_url":"https://api.github.com/users/abadger/followers","following_url":"https://api.github.com/users/abadger/following{/other_user}","gists_url":"https://api.github.com/users/abadger/gists{/gist_id}","starred_url":"https://api.github.com/users/abadger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abadger/subscriptions","organizations_url":"https://api.github.com/users/abadger/orgs","repos_url":"https://api.github.com/users/abadger/repos","events_url":"https://api.github.com/users/abadger/events{/privacy}","received_events_url":"https://api.github.com/users/abadger/received_events","type":"User","site_admin":false},"open_issues":110,"closed_issues":183,"state":"open","created_at":"2015-02-25T19:26:53Z","updated_at":"2016-06-04T16:51:16Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-05-31T03:31:36Z","updated_at":"2016-06-04T16:56:34Z","closed_at":null,"body":"<!--- Verify first that your issue/request is not already reported in GitHub -->\r\n\r\n##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest: -->\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.0.0\r\n  config file = /Users/fpereira/Projects/my-project/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\nremote_user = root\r\ninventory = ./hosts\r\nprivate_key_file = ../keys/gcloud_id_rsa\r\nhost_key_checking = False\r\nretry_files_enabled = 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\nMac OS X\r\n\r\n##### SUMMARY\r\n<!--- Explain the problem briefly -->\r\nWhen executing a `local_action` with `with_items`, output says it successfully executed for the first host and failed for the others - consequence is these other hosts don't continue on the rest of the play. The `local_action` seems to be executed just fine.\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\nWith the gives files below, simply execute your playbook: `ansible-playbook -i hosts site.yml`\r\n\r\n<!--- Paste example playbooks or commands between quotes below -->\r\n```\r\n# hosts\r\n1.1.1.1\r\n2.2.2.2\r\n3.3.3.3\r\n```\r\n\r\n```\r\n# site.yml\r\n---\r\n- hosts: all\r\n  roles:\r\n    - common\r\n```\r\n\r\n```\r\n# roles/common/tasks/main.yml\r\n---\r\n- name: \"build hosts file\"\r\n  local_action: lineinfile dest=/etc/hosts regexp=\"{{ hostvars[item].ansible_fqdn }}\" line=\"{{ item }} {{ hostvars[item].ansible_fqdn }} {{ hostvars[item].ansible_hostname }}\" state=present\r\n  become: true\r\n  with_items: \"{{ groups.all }}\"\r\n\r\n- name: ping\r\n  ping:\r\n```\r\n\r\n##### EXPECTED RESULTS\r\n<!--- What did you expect to happen when running the steps above? -->\r\nI expected my `/etc/hosts` file to contain all my hosts with their respective FQDNs and the playbook to continue with the other tasks for all hosts. Not sure if I missed something about the `local_action` directive, but from what I understand this task was not supposed to run on each of my hosts but on my local machine only.\r\n\r\n##### ACTUAL RESULTS\r\n<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->\r\nMy `/etc/hosts` file was correctly edited, but Ansible complains about a missing attribute on the `dict object` for all hosts besides the first one executed, so all following tasks are not executed for these failed hosts. I'm not sure this `dict object` error was supposed to happen either, because the setup task executed earlier was supposed to retrieve all facts for all hosts.\r\n\r\n<!--- Paste verbatim command output between quotes below -->\r\n```\r\n$ ansible-playbook -vvvv site.yml\r\nUsing /Users/fpereira/Projects/my-project/ansible/ansible.cfg as config file\r\nLoaded callback default of type stdout, v2.0\r\n\r\nPLAYBOOK: site.yml *************************************************************\r\n1 plays in site.yml\r\n\r\nPLAY [all] *********************************************************************\r\n\r\nTASK [setup] *******************************************************************\r\n<1.1.1.1> ESTABLISH SSH CONNECTION FOR USER: root\r\n<1.1.1.1> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=\"../keys/gcloud_id_rsa\"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/Users/fpereira/.ansible/cp/ansible-ssh-%h-%p-%r 1.1.1.1 '/bin/sh -c '\"'\"'( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1464665044.49-136868714810759 `\" && echo ansible-tmp-1464665044.49-136868714810759=\"` echo $HOME/.ansible/tmp/ansible-tmp-1464665044.49-136868714810759 `\" ) && sleep 0'\"'\"''\r\n<3.3.3.3> ESTABLISH SSH CONNECTION FOR USER: root\r\n<2.2.2.2> ESTABLISH SSH CONNECTION FOR USER: root\r\n<3.3.3.3> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=\"../keys/gcloud_id_rsa\"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/Users/fpereira/.ansible/cp/ansible-ssh-%h-%p-%r 3.3.3.3 '/bin/sh -c '\"'\"'( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1464665044.49-229091644808079 `\" && echo ansible-tmp-1464665044.49-229091644808079=\"` echo $HOME/.ansible/tmp/ansible-tmp-1464665044.49-229091644808079 `\" ) && sleep 0'\"'\"''\r\n<2.2.2.2> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=\"../keys/gcloud_id_rsa\"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/Users/fpereira/.ansible/cp/ansible-ssh-%h-%p-%r 2.2.2.2 '/bin/sh -c '\"'\"'( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1464665044.49-138340599945577 `\" && echo ansible-tmp-1464665044.49-138340599945577=\"` echo $HOME/.ansible/tmp/ansible-tmp-1464665044.49-138340599945577 `\" ) && sleep 0'\"'\"''\r\n<2.2.2.2> PUT /var/folders/g_/zz_rsrrx60n35rkltvtbr3xm0000gn/T/tmpQJw1B4 TO /root/.ansible/tmp/ansible-tmp-1464665044.49-138340599945577/setup\r\n<2.2.2.2> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=\"../keys/gcloud_id_rsa\"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/Users/fpereira/.ansible/cp/ansible-ssh-%h-%p-%r '[2.2.2.2]'\r\n<1.1.1.1> PUT /var/folders/g_/zz_rsrrx60n35rkltvtbr3xm0000gn/T/tmpULy4Cc TO /root/.ansible/tmp/ansible-tmp-1464665044.49-136868714810759/setup\r\n<1.1.1.1> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=\"../keys/gcloud_id_rsa\"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/Users/fpereira/.ansible/cp/ansible-ssh-%h-%p-%r '[1.1.1.1]'\r\n<3.3.3.3> PUT /var/folders/g_/zz_rsrrx60n35rkltvtbr3xm0000gn/T/tmpyXf30m TO /root/.ansible/tmp/ansible-tmp-1464665044.49-229091644808079/setup\r\n<3.3.3.3> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=\"../keys/gcloud_id_rsa\"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/Users/fpereira/.ansible/cp/ansible-ssh-%h-%p-%r '[3.3.3.3]'\r\n<2.2.2.2> ESTABLISH SSH CONNECTION FOR USER: root\r\n<2.2.2.2> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=\"../keys/gcloud_id_rsa\"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/Users/fpereira/.ansible/cp/ansible-ssh-%h-%p-%r -tt 2.2.2.2 '/bin/sh -c '\"'\"'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1464665044.49-138340599945577/setup; rm -rf \"/root/.ansible/tmp/ansible-tmp-1464665044.49-138340599945577/\" > /dev/null 2>&1 && sleep 0'\"'\"''\r\n<1.1.1.1> ESTABLISH SSH CONNECTION FOR USER: root\r\n<1.1.1.1> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=\"../keys/gcloud_id_rsa\"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/Users/fpereira/.ansible/cp/ansible-ssh-%h-%p-%r -tt 1.1.1.1 '/bin/sh -c '\"'\"'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1464665044.49-136868714810759/setup; rm -rf \"/root/.ansible/tmp/ansible-tmp-1464665044.49-136868714810759/\" > /dev/null 2>&1 && sleep 0'\"'\"''\r\n<3.3.3.3> ESTABLISH SSH CONNECTION FOR USER: root\r\n<3.3.3.3> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=\"../keys/gcloud_id_rsa\"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/Users/fpereira/.ansible/cp/ansible-ssh-%h-%p-%r -tt 3.3.3.3 '/bin/sh -c '\"'\"'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1464665044.49-229091644808079/setup; rm -rf \"/root/.ansible/tmp/ansible-tmp-1464665044.49-229091644808079/\" > /dev/null 2>&1 && sleep 0'\"'\"''\r\nok: [3.3.3.3]\r\nok: [1.1.1.1]\r\nok: [2.2.2.2]\r\n\r\nTASK [common : build hosts file] ***********************************************\r\ntask path: /Users/fpereira/Projects/my-project/ansible/roles/common/tasks/main.yml:2\r\nfatal: [2.2.2.2]: FAILED! => {\"failed\": true, \"msg\": \"'dict object' has no attribute 'ansible_fqdn'\"}\r\nfatal: [3.3.3.3]: FAILED! => {\"failed\": true, \"msg\": \"'dict object' has no attribute 'ansible_fqdn'\"}\r\n<localhost> ESTABLISH LOCAL CONNECTION FOR USER: fpereira\r\n<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1464665050.34-36248340151523 `\" && echo ansible-tmp-1464665050.34-36248340151523=\"` echo $HOME/.ansible/tmp/ansible-tmp-1464665050.34-36248340151523 `\" ) && sleep 0'\r\n<localhost> PUT /var/folders/g_/zz_rsrrx60n35rkltvtbr3xm0000gn/T/tmpGwiZXJ TO /Users/fpereira/.ansible/tmp/ansible-tmp-1464665050.34-36248340151523/lineinfile\r\n<localhost> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '\"'\"'echo BECOME-SUCCESS-oyfintxcqjdnwnhqnuqbfrrkzfzxmaqa; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /Users/fpereira/.ansible/tmp/ansible-tmp-1464665050.34-36248340151523/lineinfile; rm -rf \"/Users/fpereira/.ansible/tmp/ansible-tmp-1464665050.34-36248340151523/\" > /dev/null 2>&1'\"'\"' && sleep 0'\r\nok: [1.1.1.1 -> localhost] => (item=1.1.1.1) => {\"backup\": \"\", \"changed\": false, \"diff\": [{\"after\": \"\", \"after_header\": \"/etc/hosts (content)\", \"before\": \"\", \"before_header\": \"/etc/hosts (content)\"}, {\"after_header\": \"/etc/hosts (file attributes)\", \"before_header\": \"/etc/hosts (file attributes)\"}], \"invocation\": {\"module_args\": {\"backrefs\": false, \"backup\": false, \"content\": null, \"create\": false, \"delimiter\": null, \"dest\": \"/etc/hosts\", \"directory_mode\": null, \"follow\": false, \"force\": null, \"group\": null, \"insertafter\": null, \"insertbefore\": null, \"line\": \"1.1.1.1 slave-0.c.tenfold-tests-tf-ansible.internal slave-0\", \"mode\": null, \"owner\": null, \"regexp\": \"slave-0.c.tenfold-tests-tf-ansible.internal\", \"remote_src\": null, \"selevel\": null, \"serole\": null, \"setype\": null, \"seuser\": null, \"src\": null, \"state\": \"present\", \"validate\": null}, \"module_name\": \"lineinfile\"}, \"item\": \"1.1.1.1\", \"msg\": \"\"}\r\n<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1464665050.58-129871081474452 `\" && echo ansible-tmp-1464665050.58-129871081474452=\"` echo $HOME/.ansible/tmp/ansible-tmp-1464665050.58-129871081474452 `\" ) && sleep 0'\r\n<localhost> PUT /var/folders/g_/zz_rsrrx60n35rkltvtbr3xm0000gn/T/tmpid3ibM TO /Users/fpereira/.ansible/tmp/ansible-tmp-1464665050.58-129871081474452/lineinfile\r\n<localhost> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '\"'\"'echo BECOME-SUCCESS-zwnupwzefuhomvncbtmahghpbtthpojb; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /Users/fpereira/.ansible/tmp/ansible-tmp-1464665050.58-129871081474452/lineinfile; rm -rf \"/Users/fpereira/.ansible/tmp/ansible-tmp-1464665050.58-129871081474452/\" > /dev/null 2>&1'\"'\"' && sleep 0'\r\nok: [1.1.1.1 -> localhost] => (item=2.2.2.2) => {\"backup\": \"\", \"changed\": false, \"diff\": [{\"after\": \"\", \"after_header\": \"/etc/hosts (content)\", \"before\": \"\", \"before_header\": \"/etc/hosts (content)\"}, {\"after_header\": \"/etc/hosts (file attributes)\", \"before_header\": \"/etc/hosts (file attributes)\"}], \"invocation\": {\"module_args\": {\"backrefs\": false, \"backup\": false, \"content\": null, \"create\": false, \"delimiter\": null, \"dest\": \"/etc/hosts\", \"directory_mode\": null, \"follow\": false, \"force\": null, \"group\": null, \"insertafter\": null, \"insertbefore\": null, \"line\": \"2.2.2.2 slave-1.c.tenfold-tests-tf-ansible.internal slave-1\", \"mode\": null, \"owner\": null, \"regexp\": \"slave-1.c.tenfold-tests-tf-ansible.internal\", \"remote_src\": null, \"selevel\": null, \"serole\": null, \"setype\": null, \"seuser\": null, \"src\": null, \"state\": \"present\", \"validate\": null}, \"module_name\": \"lineinfile\"}, \"item\": \"2.2.2.2\", \"msg\": \"\"}\r\n<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1464665050.83-35862081280494 `\" && echo ansible-tmp-1464665050.83-35862081280494=\"` echo $HOME/.ansible/tmp/ansible-tmp-1464665050.83-35862081280494 `\" ) && sleep 0'\r\n<localhost> PUT /var/folders/g_/zz_rsrrx60n35rkltvtbr3xm0000gn/T/tmprK3xqM TO /Users/fpereira/.ansible/tmp/ansible-tmp-1464665050.83-35862081280494/lineinfile\r\n<localhost> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c '\"'\"'echo BECOME-SUCCESS-ydlylyeylxoijzlmgupqxntdfdgimpli; LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /Users/fpereira/.ansible/tmp/ansible-tmp-1464665050.83-35862081280494/lineinfile; rm -rf \"/Users/fpereira/.ansible/tmp/ansible-tmp-1464665050.83-35862081280494/\" > /dev/null 2>&1'\"'\"' && sleep 0'\r\nok: [1.1.1.1 -> localhost] => (item=3.3.3.3) => {\"backup\": \"\", \"changed\": false, \"diff\": [{\"after\": \"\", \"after_header\": \"/etc/hosts (content)\", \"before\": \"\", \"before_header\": \"/etc/hosts (content)\"}, {\"after_header\": \"/etc/hosts (file attributes)\", \"before_header\": \"/etc/hosts (file attributes)\"}], \"invocation\": {\"module_args\": {\"backrefs\": false, \"backup\": false, \"content\": null, \"create\": false, \"delimiter\": null, \"dest\": \"/etc/hosts\", \"directory_mode\": null, \"follow\": false, \"force\": null, \"group\": null, \"insertafter\": null, \"insertbefore\": null, \"line\": \"3.3.3.3 master-0.c.tenfold-tests-tf-ansible.internal master-0\", \"mode\": null, \"owner\": null, \"regexp\": \"master-0.c.tenfold-tests-tf-ansible.internal\", \"remote_src\": null, \"selevel\": null, \"serole\": null, \"setype\": null, \"seuser\": null, \"src\": null, \"state\": \"present\", \"validate\": null}, \"module_name\": \"lineinfile\"}, \"item\": \"3.3.3.3\", \"msg\": \"\"}\r\n\r\nTASK [common : ping] ***********************************************************\r\ntask path: /Users/fpereira/Projects/my-project/ansible/roles/common/tasks/main.yml:8\r\n<1.1.1.1> ESTABLISH SSH CONNECTION FOR USER: root\r\n<1.1.1.1> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=\"../keys/gcloud_id_rsa\"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/Users/fpereira/.ansible/cp/ansible-ssh-%h-%p-%r 1.1.1.1 '/bin/sh -c '\"'\"'( umask 77 && mkdir -p \"` echo $HOME/.ansible/tmp/ansible-tmp-1464665051.2-187465386442414 `\" && echo ansible-tmp-1464665051.2-187465386442414=\"` echo $HOME/.ansible/tmp/ansible-tmp-1464665051.2-187465386442414 `\" ) && sleep 0'\"'\"''\r\n<1.1.1.1> PUT /var/folders/g_/zz_rsrrx60n35rkltvtbr3xm0000gn/T/tmpUCjR8R TO /root/.ansible/tmp/ansible-tmp-1464665051.2-187465386442414/ping\r\n<1.1.1.1> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=\"../keys/gcloud_id_rsa\"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/Users/fpereira/.ansible/cp/ansible-ssh-%h-%p-%r '[1.1.1.1]'\r\n<1.1.1.1> ESTABLISH SSH CONNECTION FOR USER: root\r\n<1.1.1.1> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile=\"../keys/gcloud_id_rsa\"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/Users/fpereira/.ansible/cp/ansible-ssh-%h-%p-%r -tt 1.1.1.1 '/bin/sh -c '\"'\"'LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1464665051.2-187465386442414/ping; rm -rf \"/root/.ansible/tmp/ansible-tmp-1464665051.2-187465386442414/\" > /dev/null 2>&1 && sleep 0'\"'\"''\r\nok: [1.1.1.1] => {\"changed\": false, \"invocation\": {\"module_args\": {\"data\": null}, \"module_name\": \"ping\"}, \"ping\": \"pong\"}\r\n```"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/223766132","html_url":"https://github.com/ansible/ansible/issues/16059#issuecomment-223766132","issue_url":"https://api.github.com/repos/ansible/ansible/issues/16059","id":223766132,"user":{"login":"jimi-c","id":26403,"avatar_url":"https://avatars.githubusercontent.com/u/26403?v=3","gravatar_id":"","url":"https://api.github.com/users/jimi-c","html_url":"https://github.com/jimi-c","followers_url":"https://api.github.com/users/jimi-c/followers","following_url":"https://api.github.com/users/jimi-c/following{/other_user}","gists_url":"https://api.github.com/users/jimi-c/gists{/gist_id}","starred_url":"https://api.github.com/users/jimi-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimi-c/subscriptions","organizations_url":"https://api.github.com/users/jimi-c/orgs","repos_url":"https://api.github.com/users/jimi-c/repos","events_url":"https://api.github.com/users/jimi-c/events{/privacy}","received_events_url":"https://api.github.com/users/jimi-c/received_events","type":"User","site_admin":false},"created_at":"2016-06-04T16:56:34Z","updated_at":"2016-06-04T16:56:34Z","body":"Well, scratch that, I believe adding run_once is what is needed here, to ensure each entry is only output once. Otherwise, it's like each inventory item is doing a `delegate_to: localhost` (what `local_action` essentially does under the hood), so the task is repeated `{{num hosts}} * {{items in loop}}`.  The error here is probably from some other code path after the task is actually complete. I'll look into that."}}
{"actor":{"display_login":"jimi-c"}}