{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/31095","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/31095/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/31095/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/31095/events","html_url":"https://github.com/ansible/ansible/issues/31095","id":261650548,"number":31095,"title":"Ansible gather_facts cannot correctly populate service_mgr fact","user":{"login":"rahul0705","id":3588185,"avatar_url":"https://avatars2.githubusercontent.com/u/3588185?v=4","gravatar_id":"","url":"https://api.github.com/users/rahul0705","html_url":"https://github.com/rahul0705","followers_url":"https://api.github.com/users/rahul0705/followers","following_url":"https://api.github.com/users/rahul0705/following{/other_user}","gists_url":"https://api.github.com/users/rahul0705/gists{/gist_id}","starred_url":"https://api.github.com/users/rahul0705/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahul0705/subscriptions","organizations_url":"https://api.github.com/users/rahul0705/orgs","repos_url":"https://api.github.com/users/rahul0705/repos","events_url":"https://api.github.com/users/rahul0705/events{/privacy}","received_events_url":"https://api.github.com/users/rahul0705/received_events","type":"User","site_admin":false},"labels":[{"id":562292166,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.4","name":"affects_2.4","color":"ededed","default":false},{"id":48276055,"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04","default":false},{"id":636352796,"url":"https://api.github.com/repos/ansible/ansible/labels/support:core","name":"support:core","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-09-29T13:56:29Z","updated_at":"2017-09-29T20:56:04Z","closed_at":null,"author_association":"NONE","body":"<!---\r\nVerify first that your issue/request is not already reported on GitHub.\r\nAlso test if the latest release, and master branch are affected too.\r\n-->\r\n\r\n##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest: -->\r\n - Bug Report\r\n\r\n##### COMPONENT NAME\r\n<!--- Name of the module/plugin/task/feature -->\r\n- gathering_facts\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from \"ansible --version\" between quotes below -->\r\n```\r\nansible 2.4.0.0\r\n  config file = None\r\n  configured module search path = [u'/Users/******/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /Library/Python/2.7/site-packages/ansible\r\n  executable location = /usr/local/bin/ansible\r\n  python version = 2.7.10 (default, Jul 15 2017, 17:16:57) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]\r\n```\r\n\r\n##### CONFIGURATION\r\n<!---\r\nIf using Ansible 2.4 or above, paste the results of \"ansible-config dump --only-changed\"\r\n\r\nOtherwise, mention any settings you have changed/added/removed in ansible.cfg\r\n(or using the ANSIBLE_* environment variables).\r\n\r\n-->\r\nEmpty\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\nAlso mention the specific version of what you are trying to control,\r\ne.g. if this is a network bug the version of firmware on the network device.\r\n-->\r\nRunning ansible on macOS High Sierra\r\nDeploying to travis-ci 14.04 with sudo and 16.04 personal server\r\n\r\n##### SUMMARY\r\n<!--- Explain the problem briefly -->\r\nWhen gathering fact or running the setup ad-hoc command ansible cannot properly populate the ansible_service_mgr fact. Instead of populating it with the correct service manager, it get populated with \"service\"\r\n```\r\n\"ansible_service_mgr\": \"service\",\r\n```\r\n\r\n##### STEPS TO REPRODUCE\r\n<!---\r\nFor bugs, show exactly how to reproduce the problem, using a minimal test-case.\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```yaml\r\nansible -i production -m setup <host> --ask-vault-pass\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\nansible_service_mgr is set to upstart for 14.04 and systemd for 16.04\r\n\r\n##### ACTUAL RESULTS\r\n<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->\r\n\r\n<!--- Paste verbatim command output between quotes below -->\r\n```\r\n\"ansible_service_mgr\": \"service\",\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/333237062","html_url":"https://github.com/ansible/ansible/issues/31095#issuecomment-333237062","issue_url":"https://api.github.com/repos/ansible/ansible/issues/31095","id":333237062,"user":{"login":"rahul0705","id":3588185,"avatar_url":"https://avatars2.githubusercontent.com/u/3588185?v=4","gravatar_id":"","url":"https://api.github.com/users/rahul0705","html_url":"https://github.com/rahul0705","followers_url":"https://api.github.com/users/rahul0705/followers","following_url":"https://api.github.com/users/rahul0705/following{/other_user}","gists_url":"https://api.github.com/users/rahul0705/gists{/gist_id}","starred_url":"https://api.github.com/users/rahul0705/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahul0705/subscriptions","organizations_url":"https://api.github.com/users/rahul0705/orgs","repos_url":"https://api.github.com/users/rahul0705/repos","events_url":"https://api.github.com/users/rahul0705/events{/privacy}","received_events_url":"https://api.github.com/users/rahul0705/received_events","type":"User","site_admin":false},"created_at":"2017-09-29T20:56:04Z","updated_at":"2017-09-29T20:56:04Z","author_association":"NONE","body":"Is this fix in pip 2.4.0.0?"}}
{"actor":{"display_login":"rahul0705"}}