{"action":"opened","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/16935","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/16935/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/16935/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/16935/events","html_url":"https://github.com/ansible/ansible/issues/16935","id":169139233,"number":16935,"title":"Ansible facts override special variables","user":{"login":"NomAnor","id":8003824,"avatar_url":"https://avatars.githubusercontent.com/u/8003824?v=3","gravatar_id":"","url":"https://api.github.com/users/NomAnor","html_url":"https://github.com/NomAnor","followers_url":"https://api.github.com/users/NomAnor/followers","following_url":"https://api.github.com/users/NomAnor/following{/other_user}","gists_url":"https://api.github.com/users/NomAnor/gists{/gist_id}","starred_url":"https://api.github.com/users/NomAnor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NomAnor/subscriptions","organizations_url":"https://api.github.com/users/NomAnor/orgs","repos_url":"https://api.github.com/users/NomAnor/repos","events_url":"https://api.github.com/users/NomAnor/events{/privacy}","received_events_url":"https://api.github.com/users/NomAnor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-03T14:03:20Z","updated_at":"2016-08-03T14:03:20Z","closed_at":null,"body":"##### ISSUE TYPE\r\n - Bug Report\r\n\r\n##### ANSIBLE VERSION\r\nansible 2.1.1.0\r\n  configured module search path = Default w/o overrides\r\n\r\n##### OS / ENVIRONMENT\r\nLinux Mint 17\r\n\r\n##### SUMMARY\r\nAnsible facts generated by the setup module will override special variables like _ansible_user_.\r\n\r\n##### STEPS TO REPRODUCE\r\nI have a server wich acts as a router and I renamed the network interfaces so it's easier to see which interface belongs to which network. So instead of  _ethX_ one of my interfaces is called _user_. \r\n\r\n##### EXPECTED RESULTS\r\nThe setup module should not create \"harmful\" fact names.\r\n\r\n##### ACTUAL RESULTS\r\nAfter ansible gathered the facts the _ansible_user_ variable gets overridden with the information of that interface and later tasks can't connect with ssh because of a wrong username.\r\n\r\nIt would be better to use a dictionary like _ansible_devices_ e.g _ansible_interfaces_."}}
{"actor":{"display_login":"NomAnor"}}