{"action":"closed","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/10380","labels_url":"https://api.github.com/repos/ansible/ansible/issues/10380/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/10380/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/10380/events","html_url":"https://github.com/ansible/ansible/issues/10380","id":59718302,"number":10380,"title":"ansible_distribution not set within Docker container","user":{"login":"bkeroackdsc","id":9576999,"avatar_url":"https://avatars.githubusercontent.com/u/9576999?v=3","gravatar_id":"","url":"https://api.github.com/users/bkeroackdsc","html_url":"https://github.com/bkeroackdsc","followers_url":"https://api.github.com/users/bkeroackdsc/followers","following_url":"https://api.github.com/users/bkeroackdsc/following{/other_user}","gists_url":"https://api.github.com/users/bkeroackdsc/gists{/gist_id}","starred_url":"https://api.github.com/users/bkeroackdsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkeroackdsc/subscriptions","organizations_url":"https://api.github.com/users/bkeroackdsc/orgs","repos_url":"https://api.github.com/users/bkeroackdsc/repos","events_url":"https://api.github.com/users/bkeroackdsc/events{/privacy}","received_events_url":"https://api.github.com/users/bkeroackdsc/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/P3","name":"P3","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-03T22:37:57Z","updated_at":"2015-03-04T20:27:27Z","closed_at":"2015-03-04T20:27:27Z","body":"Using Ansible to provision inside of Docker containers (based on https://github.com/phusion/passenger-docker ), ``ansible_distribution`` does not appear to be set despite the container being Ubuntu-based. The following is the lsb_release output from inside the container:\r\n\r\n```bash\r\nroot@a25be1bb9004:~# lsb_release -a\r\nNo LSB modules are available.\r\nDistributor ID:\tUbuntu\r\nDescription:\tUbuntu 14.04.1 LTS\r\nRelease:\t14.04\r\nCodename:\ttrusty\r\n```\r\n\r\nThe following error message is triggered:\r\n\r\n```\r\nfatal: [localhost] => error while evaluating conditional: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'\r\n```\r\n\r\nI cannot find any documentation on how ``ansible_distribution`` is set or when it would not be expected to be present. I'm working around the issue by manually setting ``ansible_distribution`` in the playbook vars."}}