{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2951","repository_url":"https://api.github.com/repos/ansible/ansible-modules-core","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2951/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2951/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2951/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/2951","id":131169536,"number":2951,"title":"apt update_cache gives error on ubuntu for Ansible 2.0.0.2 ","user":{"login":"xuchen81","id":4729037,"avatar_url":"https://avatars.githubusercontent.com/u/4729037?v=3","gravatar_id":"","url":"https://api.github.com/users/xuchen81","html_url":"https://github.com/xuchen81","followers_url":"https://api.github.com/users/xuchen81/followers","following_url":"https://api.github.com/users/xuchen81/following{/other_user}","gists_url":"https://api.github.com/users/xuchen81/gists{/gist_id}","starred_url":"https://api.github.com/users/xuchen81/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xuchen81/subscriptions","organizations_url":"https://api.github.com/users/xuchen81/orgs","repos_url":"https://api.github.com/users/xuchen81/repos","events_url":"https://api.github.com/users/xuchen81/events{/privacy}","received_events_url":"https://api.github.com/users/xuchen81/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/affects_2.2","name":"affects_2.2","color":"5319e7"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/bug_report","name":"bug_report","color":"fbca04"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/P2","name":"P2","color":"fad8c7"},{"url":"https://api.github.com/repos/ansible/ansible-modules-core/labels/waiting_on_maintainer","name":"waiting_on_maintainer","color":"d93f0b"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":31,"created_at":"2016-02-03T22:07:44Z","updated_at":"2016-10-04T00:29:38Z","closed_at":null,"body":"##### ISSUE TYPE\r\nBug Report\r\n\r\n##### COMPONENT NAME\r\napt module\r\n\r\n##### ANSIBLE VERSION\r\nN/A\r\n\r\n#####  SUMMARY\r\nThe simple following command:\r\n```\r\n- name: Update apt cache.\r\n  apt: update_cache=true\r\n  become: true\r\n```\r\n\r\nThrows an error on AWS Ubuntu instances.\r\n\r\nfatal: [xx.xx.xxx.x]: FAILED! => {\"changed\": false, \"failed\": true, \"module_stderr\": \"\", \"module_stdout\": \"Traceback (most recent call last):\\r\\n  File \\\"/home/ubuntu/.ansible/tmp/ansible-tmp-1454536847.17-86172912102079/apt\\\", line 2630, in <module>\\r\\n    main()\\r\\n  File \\\"/home/ubuntu/.ansible/tmp/ansible-tmp-1454536847.17-86172912102079/apt\\\", line 603, in main\\r\\n    cache = apt.Cache()\\r\\n  File \\\"/usr/lib/python2.7/dist-packages/apt/cache.py\\\", line 107, in __init__\\r\\n    self.open(progress)\\r\\n  File \\\"/usr/lib/python2.7/dist-packages/apt/cache.py\\\", line 151, in open\\r\\n    self._cache = apt_pkg.Cache(progress)\\r\\nSystemError: E:Encountered a section with no Package: header, E:Problem with MergeList /var/lib/apt/lists/us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty-updates_universe_i18n_Translation-en, E:The package lists or status file could not be parsed or opened.\\r\\n\", \"msg\": \"MODULE FAILURE\", \"parsed\": false}\r\n\r\nHowever, when I ssh into the instance, and do sudo apt-get update manually, there is no problem at all. And then, if I ran the task again, the problem will go away, I guess because I did the manual update on the instance.\r\n\r\nAny ideas?\r\n\r\n\r\nThanks\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/251265306","html_url":"https://github.com/ansible/ansible-modules-core/issues/2951#issuecomment-251265306","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2951","id":251265306,"user":{"login":"adichiru","id":7525591,"avatar_url":"https://avatars.githubusercontent.com/u/7525591?v=3","gravatar_id":"","url":"https://api.github.com/users/adichiru","html_url":"https://github.com/adichiru","followers_url":"https://api.github.com/users/adichiru/followers","following_url":"https://api.github.com/users/adichiru/following{/other_user}","gists_url":"https://api.github.com/users/adichiru/gists{/gist_id}","starred_url":"https://api.github.com/users/adichiru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adichiru/subscriptions","organizations_url":"https://api.github.com/users/adichiru/orgs","repos_url":"https://api.github.com/users/adichiru/repos","events_url":"https://api.github.com/users/adichiru/events{/privacy}","received_events_url":"https://api.github.com/users/adichiru/received_events","type":"User","site_admin":false},"created_at":"2016-10-04T00:29:38Z","updated_at":"2016-10-04T00:29:38Z","body":"+1 On Ubuntu 16.04.1 LTS with ansible 2.0.0.2 and python 2.7\r\n\r\nHas nothing to do with Amazon.\r\n\r\nsudo rm -rf /var/lib/apt/lists/* solve the issues momentarily for me too."}}
{"actor":{"display_login":"adichiru"}}