{"action":"closed","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1824","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1824/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1824/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/1824/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/1824","id":97740702,"number":1824,"title":"bug module apt_repository broken for debian","user":{"login":"guits","id":3717838,"avatar_url":"https://avatars.githubusercontent.com/u/3717838?v=3","gravatar_id":"","url":"https://api.github.com/users/guits","html_url":"https://github.com/guits","followers_url":"https://api.github.com/users/guits/followers","following_url":"https://api.github.com/users/guits/following{/other_user}","gists_url":"https://api.github.com/users/guits/gists{/gist_id}","starred_url":"https://api.github.com/users/guits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guits/subscriptions","organizations_url":"https://api.github.com/users/guits/orgs","repos_url":"https://api.github.com/users/guits/repos","events_url":"https://api.github.com/users/guits/events{/privacy}","received_events_url":"https://api.github.com/users/guits/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-28T15:52:17Z","updated_at":"2015-07-28T19:16:08Z","closed_at":"2015-07-28T19:16:08Z","body":"Hello,\r\n\r\ni think there is a problem with the module apt_repository.\r\n\r\ni have a very basic usage of the module under debian (jessie).\r\n```\r\n- name: add my repo\r\n  apt_repository: \"repo='deb http://mylogin:mypassword@my.repo.com wheezy main' mode=644 state=present\"\r\n- name: add gpg public key for my repo\r\n  apt_key: url=http://mylogin:mypassword@my.repo.com/key/mykey.pub state=present\r\n```\r\n\r\ni got the following python traceback :\r\n```\r\n  Traceback (most recent call last):\r\n  File \\\"/root/.ansible/tmp/ansible-tmp-1438092928.49-68932008668391/apt_repository\\\", line 2948, in <module> main()\r\n  File \\\"/root/.ansible/tmp/ansible-tmp-1438092928.49-68932008668391/apt_repository\\\", line 454, in main\r\n  if state == 'present' and expanded_repo not in sourceslist.repos_urls:\r\n  AttributeError: 'SourcesList' object has no attribute 'repos_urls'\r\n```\r\n\r\nthis error is at :\r\nhttps://github.com/ansible/ansible-modules-core/blob/stable-1.9/packaging/os/apt_repository.py#L449\r\n```\r\n        if state == 'present' and expanded_repo not in sourceslist.repos_urls:\r\n```\r\n\r\nusing `repos_urls` method, i'm using debian so my `sourcelist` variable is an instance of `SourceList()` :\r\nhttps://github.com/ansible/ansible-modules-core/blob/stable-1.9/packaging/os/apt_repository.py#L436\r\n```\r\n            sourceslist = SourcesList()\r\n````\r\nbut the method `repos_urls()` is only implemented in `UbuntuSourcesList()` for Ubuntu"}}