Closed michael-l-a closed 4 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
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
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.
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.
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.