{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2559","labels_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2559/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2559/comments","events_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2559/events","html_url":"https://github.com/ansible/ansible-modules-core/issues/2559","id":119010572,"number":2559,"title":"yum module refuses to install package, saying it's already installed","user":{"login":"bgdnlp","id":4785225,"avatar_url":"https://avatars.githubusercontent.com/u/4785225?v=3","gravatar_id":"","url":"https://api.github.com/users/bgdnlp","html_url":"https://github.com/bgdnlp","followers_url":"https://api.github.com/users/bgdnlp/followers","following_url":"https://api.github.com/users/bgdnlp/following{/other_user}","gists_url":"https://api.github.com/users/bgdnlp/gists{/gist_id}","starred_url":"https://api.github.com/users/bgdnlp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgdnlp/subscriptions","organizations_url":"https://api.github.com/users/bgdnlp/orgs","repos_url":"https://api.github.com/users/bgdnlp/repos","events_url":"https://api.github.com/users/bgdnlp/events{/privacy}","received_events_url":"https://api.github.com/users/bgdnlp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-26T10:06:53Z","updated_at":"2015-11-26T10:26:01Z","closed_at":null,"body":"Trying to install a package (samba-client), ansible returns\r\n```\r\n\"ok: [HOST2] => {\"changed\": false, \"msg\": \"\", \"rc\": 0, \r\n\"results\": [\"package providing samba-client is already installed\"]}\"\r\n```\r\nalthough the package is not installed and running \"yum install samba-client\" prompts for package installation along with some dependencies.\r\nI don't know if that would work on 1.9.1 or not.\r\n\r\nDetails:\r\nAnsible version 1.9.2, target OS RedHat 6.0, internal repositories that mirror official ones. I don't know how they are set up exactly.\r\n\r\nThe playbook, which is in roles/smbclient/tasks/main.yml, contains just:\r\n```\r\n---\r\n- name: \"package\"\r\n  yum: name=samba-client state=present\r\n```\r\n\r\nRunning the playbook on two hosts. HOST1 already has samba-client installed. HOST2 doesn't. Here's what ansible returns:\r\n```\r\nok: [HOST1.has.samba] => {\"changed\": false, \"msg\": \"\", \"rc\": 0, \"results\": [\"samba-client-3.6.23-20.el6.x86_64 providing samba-client is already installed\"]}\r\nok: [HOST2.doesnt.have.samba] => {\"changed\": false, \"msg\": \"\", \"rc\": 0, \"results\": [\"package providing samba-client is already installed\"]}\r\n```"},"comment":{"url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/comments/159870280","html_url":"https://github.com/ansible/ansible-modules-core/issues/2559#issuecomment-159870280","issue_url":"https://api.github.com/repos/ansible/ansible-modules-core/issues/2559","id":159870280,"user":{"login":"bgdnlp","id":4785225,"avatar_url":"https://avatars.githubusercontent.com/u/4785225?v=3","gravatar_id":"","url":"https://api.github.com/users/bgdnlp","html_url":"https://github.com/bgdnlp","followers_url":"https://api.github.com/users/bgdnlp/followers","following_url":"https://api.github.com/users/bgdnlp/following{/other_user}","gists_url":"https://api.github.com/users/bgdnlp/gists{/gist_id}","starred_url":"https://api.github.com/users/bgdnlp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgdnlp/subscriptions","organizations_url":"https://api.github.com/users/bgdnlp/orgs","repos_url":"https://api.github.com/users/bgdnlp/repos","events_url":"https://api.github.com/users/bgdnlp/events{/privacy}","received_events_url":"https://api.github.com/users/bgdnlp/received_events","type":"User","site_admin":false},"created_at":"2015-11-26T10:26:01Z","updated_at":"2015-11-26T10:26:01Z","body":"Using state=latest instead of present, and running from the command line without a playbook, returns basically the same thing:\r\n\r\n```\r\n% ansible HOSTS -s -K -i inventory/file -m yum -a \"name=samba-client state=latest\"\r\nHOST2.doesnt.have.samba | success >> {\r\n    \"changed\": false,\r\n    \"msg\": \"\",\r\n    \"rc\": 0,\r\n    \"results\": [\r\n        \"All packages providing samba-client are up to date\"\r\n    ]\r\n}\r\n\r\nHOST1.has.samba | success >> {\r\n    \"changed\": false,\r\n    \"msg\": \"\",\r\n    \"rc\": 0,\r\n    \"results\": [\r\n        \"All packages providing samba-client are up to date\"\r\n    ]\r\n}\r\n```"}}