{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/4279","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/4279/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/4279/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/4279/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/4279","id":168286153,"number":4279,"title":"add_host runs only for first host in group","user":{"login":"dborysenko","id":14313734,"avatar_url":"https://avatars.githubusercontent.com/u/14313734?v=3","gravatar_id":"","url":"https://api.github.com/users/dborysenko","html_url":"https://github.com/dborysenko","followers_url":"https://api.github.com/users/dborysenko/followers","following_url":"https://api.github.com/users/dborysenko/following{/other_user}","gists_url":"https://api.github.com/users/dborysenko/gists{/gist_id}","starred_url":"https://api.github.com/users/dborysenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dborysenko/subscriptions","organizations_url":"https://api.github.com/users/dborysenko/orgs","repos_url":"https://api.github.com/users/dborysenko/repos","events_url":"https://api.github.com/users/dborysenko/events{/privacy}","received_events_url":"https://api.github.com/users/dborysenko/received_events","type":"User","site_admin":false},"labels":[{"id":437720344,"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/affects_2.1","name":"affects_2.1","color":"5319e7","default":false},{"id":132571937,"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/bug_report","name":"bug_report","color":"fbca04","default":false},{"id":414073372,"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/waiting_on_maintainer","name":"waiting_on_maintainer","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-07-29T09:30:26Z","updated_at":"2016-12-12T18:47:49Z","closed_at":null,"body":"<!--- Verify first that your issue/request is not already reported in GitHub -->\n##### ISSUE TYPE\n\n<!--- Pick one below and delete the rest: -->\n- Bug Report\n##### COMPONENT NAME\n\n<!--- Name of the plugin/module/task -->\n- add_host\n##### ANSIBLE VERSION\n\n<!--- Paste verbatim output from “ansible --version” between quotes below -->\n\n```\nansible 2.1.1.0\n  config file = /etc/ansible/ansible.cfg\n  configured module search path = Default w/o overrides\n```\n##### CONFIGURATION\n\n<!---\nMention any settings you have changed/added/removed in ansible.cfg\n(or using the ANSIBLE_* environment variables).\n-->\n##### OS / ENVIRONMENT\n\n<!---\nMention the OS you are running Ansible from, and the OS you are\nmanaging, or say “N/A” for anything that is not platform-specific.\n-->\n\nRed Hat 6.2; MAC OS 10.11.6\n##### SUMMARY\n\n<!--- Explain the problem briefly -->\n\nInvoking add_host against group of two hosts actually runs against only one host (the first one in an inventory file)\n##### STEPS TO REPRODUCE\n\n<!---\nFor bugs, show exactly how to reproduce the problem.\nFor new features, show how the feature would be used.\n-->\n\nhosts:\n\n```\n[myhosts]\ntst1.example.com\ntst2.example.com\n```\n\ntst.yml:\n\n<!--- Paste example playbooks or commands between quotes below -->\n\n``` yml\n- hosts: myhosts\n  gather_facts: False\n  tasks:\n    - add_host: name={{ inventory_hostname }} groups=\"newgroup\"\n```\n\nrun command:\n\n```\nansible-playbook -i hosts tst.yml -vvvv\n```\n\n<!--- You can also paste gist.github.com links for larger files -->\n##### EXPECTED RESULTS\n\n<!--- What did you expect to happen when running the steps above? -->\n\nI've expected add_host task would be applied against two hosts: tst1.example.com; tst2.example.com\n\n```\nUsing /etc/ansible/ansible.cfg as config file\nLoaded callback default of type stdout, v2.0\n\nPLAYBOOK: tst.yml **************************************************************\n1 plays in tst.yml\n\nPLAY [myhosts] *****************************************************************\n\nTASK [add_host] ****************************************************************\ntask path: /Users/dborysenko/Temp/tst.yml:4\ncreating host via 'add_host': hostname=tst1.example.com\nchanged: [tst1.example.com] => {\"add_host\": {\"groups\": [\"newgroup\"], \"host_name\": \"tst1.example.com\", \"host_vars\": {}}, \"changed\": true, \"invocation\": {\"module_args\": {\"groups\": \"newgroup\", \"name\": \"tst1.example.com\"}, \"module_name\": \"add_host\"}}\nchanged: [tst2.example.com] => {\"add_host\": {\"groups\": [\"newgroup\"], \"host_name\": \"tst2.example.com\", \"host_vars\": {}}, \"changed\": true, \"invocation\": {\"module_args\": {\"groups\": \"newgroup\", \"name\": \"tst2.example.com\"}, \"module_name\": \"add_host\"}}\n\n\nPLAY RECAP *********************************************************************\ntst1.example.com           : ok=1    changed=1    unreachable=0    failed=0\ntst2.example.com           : ok=1    changed=1    unreachable=0    failed=0\n```\n##### ACTUAL RESULTS\n\n<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->\n\nadd_hosts task was applied only for tst1.example.com host.\n\n<!--- Paste verbatim command output between quotes below -->\n\n```\nUsing /etc/ansible/ansible.cfg as config file\nLoaded callback default of type stdout, v2.0\n\nPLAYBOOK: tst.yml **************************************************************\n1 plays in tst.yml\n\nPLAY [myhosts] *****************************************************************\n\nTASK [add_host] ****************************************************************\ntask path: /Users/dborysenko/Temp/tst.yml:4\ncreating host via 'add_host': hostname=tst1.example.com\nchanged: [tst1.example.com] => {\"add_host\": {\"groups\": [\"newgroup\"], \"host_name\": \"tst1.example.com\", \"host_vars\": {}}, \"changed\": true, \"invocation\": {\"module_args\": {\"groups\": \"newgroup\", \"name\": \"tst1.example.com\"}, \"module_name\": \"add_host\"}}\n\nPLAY RECAP *********************************************************************\ntst1.example.com           : ok=1    changed=1    unreachable=0    failed=0\n```\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/266516012","html_url":"https://github.com/ansible/ansible-modules-core/issues/4279#issuecomment-266516012","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/4279","id":266516012,"user":{"login":"Josh-West-Bose","id":22239668,"avatar_url":"https://avatars.githubusercontent.com/u/22239668?v=3","gravatar_id":"","url":"https://api.github.com/users/Josh-West-Bose","html_url":"https://github.com/Josh-West-Bose","followers_url":"https://api.github.com/users/Josh-West-Bose/followers","following_url":"https://api.github.com/users/Josh-West-Bose/following{/other_user}","gists_url":"https://api.github.com/users/Josh-West-Bose/gists{/gist_id}","starred_url":"https://api.github.com/users/Josh-West-Bose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Josh-West-Bose/subscriptions","organizations_url":"https://api.github.com/users/Josh-West-Bose/orgs","repos_url":"https://api.github.com/users/Josh-West-Bose/repos","events_url":"https://api.github.com/users/Josh-West-Bose/events{/privacy}","received_events_url":"https://api.github.com/users/Josh-West-Bose/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T18:47:49Z","updated_at":"2016-12-12T18:47:49Z","body":"This is still an issue with Ansible 2.2.0"}}
{"actor":{"display_login":"Josh-West-Bose"}}