ansible-oracle icon indicating copy to clipboard operation
ansible-oracle copied to clipboard

Empty enablerepo and disablerepo values throwing error

Open enlightenalpha opened this issue 6 years ago • 2 comments

Role: orahost Task: main.yml Module: Yum Error: "msg": "Error accessing repos: Error getting repository data for , repository not found"

Ansible 2.7 introduced the option to define enablerepo and disablerepo as an arrays instead of comma delimited values. Not sure if this change introduced a bug, but making the changes below "fixed" the issue for us:

--- a/roles/orahost/defaults/main.yml +++ b/roles/orahost/defaults/main.yml @@ -48,8 +48,8 @@ keyfile: /tmp/known_hosts

Extra repositories that should be enabled

  • extrarepos_enabled:
  • extrarepos_disabled:
  • extrarepos_enabled: []
  • extrarepos_disabled: []

enlightenalpha avatar Oct 17 '18 17:10 enlightenalpha

I think we hit a bug in Ansible 2.7: https://github.com/ansible/ansible/issues/46517

I can confirm the problem with Ansibel 2.7.0.

The following version from source is working:

ansible 2.7.0.post0 (stable-2.7 7269eb5413) last updated 2018/10/20 09:35:40 (GMT +200)

This is the 2nd time when EPEL send me an update of Ansible who broke ansible-oracle...

Rendanic avatar Oct 20 '18 07:10 Rendanic

I read the whole issue again and found a solution for Ansible 2.7.0. I did a test with Ansible 2.4 to make sure that this will not break older versions of Ansible.

Pull Request is #124

Rendanic avatar Oct 20 '18 08:10 Rendanic