{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/4079","labels_url":"https://api.github.com/repos/ansible/ansible/issues/4079/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/4079/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/4079/events","html_url":"https://github.com/ansible/ansible/issues/4079","id":19267288,"number":4079,"title":"option to auto-install python-apt module","user":{"login":"iivvoo","id":540122,"avatar_url":"https://avatars.githubusercontent.com/u/540122?v=3","gravatar_id":"","url":"https://api.github.com/users/iivvoo","html_url":"https://github.com/iivvoo","followers_url":"https://api.github.com/users/iivvoo/followers","following_url":"https://api.github.com/users/iivvoo/following{/other_user}","gists_url":"https://api.github.com/users/iivvoo/gists{/gist_id}","starred_url":"https://api.github.com/users/iivvoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iivvoo/subscriptions","organizations_url":"https://api.github.com/users/iivvoo/orgs","repos_url":"https://api.github.com/users/iivvoo/repos","events_url":"https://api.github.com/users/iivvoo/events{/privacy}","received_events_url":"https://api.github.com/users/iivvoo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/feature_idea","name":"feature_idea","color":"006b75"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2013-09-10T15:43:05Z","updated_at":"2015-01-21T17:28:39Z","closed_at":"2013-11-12T02:50:43Z","body":"If the 'apt' module is used but python-apt is not installed on the target host, ansible bails out with:\r\n\r\n\r\n    TASK: [Install sudo] ********************************************************** \r\n    failed: [hoppi] => {\"failed\": true}\r\n    msg: Could not import python modules: apt, apt_pkg. Please install python-apt package.\r\n\r\n    FATAL: all hosts have already failed -- aborting\r\n\r\nwhich means you're always forced to do some workaround to make sure python-apt is installed.\r\n\r\nAn option to somehow auto-install python-apt if necessary would be nice.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/70881797","html_url":"https://github.com/ansible/ansible/issues/4079#issuecomment-70881797","issue_url":"https://api.github.com/repos/ansible/ansible/issues/4079","id":70881797,"user":{"login":"d-mo","id":1026101,"avatar_url":"https://avatars.githubusercontent.com/u/1026101?v=3","gravatar_id":"","url":"https://api.github.com/users/d-mo","html_url":"https://github.com/d-mo","followers_url":"https://api.github.com/users/d-mo/followers","following_url":"https://api.github.com/users/d-mo/following{/other_user}","gists_url":"https://api.github.com/users/d-mo/gists{/gist_id}","starred_url":"https://api.github.com/users/d-mo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/d-mo/subscriptions","organizations_url":"https://api.github.com/users/d-mo/orgs","repos_url":"https://api.github.com/users/d-mo/repos","events_url":"https://api.github.com/users/d-mo/events{/privacy}","received_events_url":"https://api.github.com/users/d-mo/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T17:28:39Z","updated_at":"2015-01-21T17:28:39Z","body":"I'm getting this error with Ansible version 1.8.2. Downgrading to 1.7.2 fixes it."}}