Closed bryanhiestand closed 6 years ago
I will try to get a pull request in later, but this worked for me
templates/etc/yum.repos.d/influxdata.repo.j2
[influxdb]
name = InfluxDB Repository - {{ ansible_distribution }} $releasever
{% if ansible_distribution|lower == "amazon" %}
baseurl = "{{ telegraf_influxdata_base_url }}/centos/6/amd64/{{ telegraf_install_version }}"
{% else %}
baseurl = {{ telegraf_influxdata_base_url }}/{{ ansible_distribution|lower }}/$releasever/$basearch/{{ telegraf_install_version }}
{% endif %}
enabled = 1
gpgcheck = 1
gpgkey = {{ telegraf_influxdata_base_url }}/influxdb.key
sslverify = 1
Fixed with #36
This role fails on Amazon linux because it tries to access https://repos.influxdata.com/amazon instead of https://repos.influxdata.com/centos
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "https://repos.influxdata.com//amazon/latest/x86_64/stable/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - \"The requested URL returned error: 404 Not Found\"\nTrying other mirror.\n\n\n One of the configured repositories failed (InfluxDB Repository - Amazon latest),\n and yum doesn't have enough cached data to continue. At this point the only\n safe thing yum can do is fail. There are a few ways to work \"fix\" this:\n\n 1. Contact the upstream for the repository and get them to fix the problem.\n\n 2. Reconfigure the baseurl/etc. for the repository, to point to a working\n upstream. This is most often useful if you are using a newer\n distribution release than is supported by the repository (and the\n packages for the previous distribution release still work).\n\n 3. Disable the repository, so yum won't use it by default. Yum will then\n just ignore the repository until you permanently enable it again or use\n --enablerepo for temporary usage:\n\n yum-config-manager --disable influxdb\n\n 4. Configure the failing repository to be skipped, if it is unavailable.\n Note that yum will try to contact the repo. when it runs most commands,\n so will have to try and fail each time (and thus. yum will be be much\n slower). If it is a very temporary problem though, this is often a nice\n compromise:\n\n yum-config-manager --save --setopt=influxdb.skip_if_unavailable=true\n\nfailure: repodata/repomd.xml from influxdb: [Errno 256] No more mirrors to try.\n", "rc": 1, "results": []}