{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/46517","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/46517/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/46517/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/46517/events","html_url":"https://github.com/ansible/ansible/issues/46517","id":366983022,"node_id":"MDU6SXNzdWUzNjY5ODMwMjI=","number":46517,"title":"'repository not found' if not passing a repository to yum 'enablerepo' parameter","user":{"login":"geerlingguy","id":481677,"node_id":"MDQ6VXNlcjQ4MTY3Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/481677?v=4","gravatar_id":"","url":"https://api.github.com/users/geerlingguy","html_url":"https://github.com/geerlingguy","followers_url":"https://api.github.com/users/geerlingguy/followers","following_url":"https://api.github.com/users/geerlingguy/following{/other_user}","gists_url":"https://api.github.com/users/geerlingguy/gists{/gist_id}","starred_url":"https://api.github.com/users/geerlingguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geerlingguy/subscriptions","organizations_url":"https://api.github.com/users/geerlingguy/orgs","repos_url":"https://api.github.com/users/geerlingguy/repos","events_url":"https://api.github.com/users/geerlingguy/events{/privacy}","received_events_url":"https://api.github.com/users/geerlingguy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-04T21:45:32Z","updated_at":"2018-10-04T21:49:15Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"##### SUMMARY\r\n\r\nIf I pass either an empty string, or use `default(omit)` for the `enablerepo` parameter on a `yum` module task, I get a failure when running the task. Ansible < 2.7.0 did not have this issue.\r\n\r\n##### ISSUE TYPE\r\n- Bug Report\r\n\r\n##### COMPONENT NAME\r\n`yum`\r\n\r\n##### ANSIBLE VERSION\r\n```\r\nansible 2.7.0\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = [u'/Users/jeff.geerling/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/local/lib/python2.7/site-packages/ansible\r\n  executable location = /usr/local/bin/ansible\r\n  python version = 2.7.15 (default, Jul 23 2018, 21:27:06) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)]\r\n```\r\n\r\n##### CONFIGURATION\r\n\r\n```\r\nANSIBLE_NOCOWS(/etc/ansible/ansible.cfg) = True\r\nANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True\r\nANSIBLE_SSH_CONTROL_PATH(/etc/ansible/ansible.cfg) = %(directory)s/%%h-%%p-%%r\r\nDEFAULT_FORKS(/etc/ansible/ansible.cfg) = 20\r\nDEFAULT_LOAD_CALLBACK_PLUGINS(/etc/ansible/ansible.cfg) = True\r\nDEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = [u'/Users/jeff.geerling/Dropbox/VMs/roles']\r\nDEFAULT_STDOUT_CALLBACK(/etc/ansible/ansible.cfg) = yaml\r\nRETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False\r\n```\r\n\r\n##### OS / ENVIRONMENT\r\nmacOS host, Docker container or VirtualBox VM being managed\r\n\r\n##### STEPS TO REPRODUCE\r\n\r\n```yaml\r\n- hosts: all\r\n  vars:\r\n    apache_enablerepo: ''\r\n  tasks:\r\n    - name: Ensure Apache is installed on RHEL.\r\n      yum:\r\n        name: httpd\r\n        state: present\r\n        enablerepo: \"{{ apache_enablerepo | default(omit) }}\"\r\n```\r\n\r\n##### EXPECTED RESULTS\r\n\r\nhttpd should be installed from the default package repo since none is set via `enablerepo`.\r\n\r\n\r\n##### ACTUAL RESULTS\r\n\r\n```\r\nTASK [geerlingguy.apache : Ensure Apache is installed on RHEL.] ********************\r\nfatal: [instance]: FAILED! => {\"changed\": false, \"msg\": \"Error setting/accessing repos: Error getting repository data for , repository not found\"}\r\n```"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/427181146","html_url":"https://github.com/ansible/ansible/issues/46517#issuecomment-427181146","issue_url":"https://api.github.com/repos/ansible/ansible/issues/46517","id":427181146,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzE4MTE0Ng==","user":{"login":"geerlingguy","id":481677,"node_id":"MDQ6VXNlcjQ4MTY3Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/481677?v=4","gravatar_id":"","url":"https://api.github.com/users/geerlingguy","html_url":"https://github.com/geerlingguy","followers_url":"https://api.github.com/users/geerlingguy/followers","following_url":"https://api.github.com/users/geerlingguy/following{/other_user}","gists_url":"https://api.github.com/users/geerlingguy/gists{/gist_id}","starred_url":"https://api.github.com/users/geerlingguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geerlingguy/subscriptions","organizations_url":"https://api.github.com/users/geerlingguy/orgs","repos_url":"https://api.github.com/users/geerlingguy/repos","events_url":"https://api.github.com/users/geerlingguy/events{/privacy}","received_events_url":"https://api.github.com/users/geerlingguy/received_events","type":"User","site_admin":false},"created_at":"2018-10-04T21:49:15Z","updated_at":"2018-10-04T21:49:15Z","author_association":"CONTRIBUTOR","body":"This is popping up all over the place where I allow users to optionally set a repo, including my git role (https://travis-ci.org/geerlingguy/ansible-role-php/jobs/437341030#L770-L772), apache role (https://travis-ci.org/geerlingguy/ansible-role-drupal/jobs/437318840#L864), and I'm guessing I'll keep having more and more build failures come in as the weekly cron jobs get kicked off :("}}
{"actor":{"display_login":"geerlingguy"}}