geerlingguy / ansible-role-varnish

Ansible Role - Varnish HTTP accelerator
https://galaxy.ansible.com/geerlingguy/varnish/
MIT License
80 stars 88 forks source link

Failed to install Varnish on AWS Linux 2 #89

Closed txynidakis closed 4 years ago

txynidakis commented 5 years ago

Hi I was attempting to install Varnish on an Amazon Linux 2 AMI and it failed.

TASK [mwp.varnish : Ensure Varnish 6.1 is installed.] ** fatal: [10.202.1.164]: FAILED! => {"changed": false, "msg": "Failure talking to yum: failure: repodata/repomd.xml from varnishcache_varnish61: [Errno 256] No more mirrors to try.\nhttps://packagecloud.io/varnishcache/varnish61/el/2/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found"}

The problem relates to varnish_yum_repo_baseurl: https://packagecloud.io/varnishcache/{{ varnish_packagecloud_repo }}/el/{{ ansible_distribution_major_version|int }}/$basearch

When using Amazon Linux 2 ansible_distribution is ansible tag_Name_${linuxdistro}_${role}_base_build_${date}_01 -m setup | grep ansible_distribution_major_version

   "ansible_distribution_major_version": "2",

The role ran fine on a RHEL7 instance,

To get around the issues I hard coded the EP version for the moment.

The question I suppose it, would you recommend an alternative solution?

Kind regards

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.