geerlingguy / ansible-role-repo-epel

Ansible Role - EPEL Repository for RHEL/CentOS
https://galaxy.ansible.com/geerlingguy/repo-epel/
MIT License
186 stars 148 forks source link

Wrong detection if EPEL repo enabled #22

Closed michael-l-a closed 4 years ago

michael-l-a commented 7 years ago

Code checks only if file exists: - name: Check if EPEL repo is already configured. stat: path={{ epel_repofile_path }} register: epel_repofile_result But sometimes (for example, on Amazon Linux distro) it exists but not enabled. Can be solved maybe this way.

MichaelLeeHobbs commented 5 years ago

Same issue I think. Using Amazon Linux 2

TASK [geerlingguy.repo-epel : Install EPEL repo.] **** fatal: [swarm-02]: FAILED! => {"msg": "The conditional check 'result.rc == 0' failed. The error was: error while evaluating conditional (result.rc == 0): 'dict object' has no attribute 'rc'"} fatal: [swarm-01]: FAILED! => {"msg": "The conditional check 'result.rc == 0' failed. The error was: error while evaluating conditional (result.rc == 0): 'dict object' has no attribute 'rc'"} to retry, use: --limit @/root/dockerSwarm/playbook.retry

MichaelLeeHobbs commented 5 years ago

This works of AWS Linux 2 for anyone that finds this.

- name: Install EPEL repo on AWS Linux 2
  yum:
     name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
     state: present
stale[bot] commented 4 years ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] commented 4 years ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.