Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yum repo does not work on Amazon Linux #19

Closed
bryanhiestand opened this issue Dec 21, 2016 · 2 comments
Closed

yum repo does not work on Amazon Linux #19

bryanhiestand opened this issue Dec 21, 2016 · 2 comments

Comments

@bryanhiestand
Copy link

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": []}

@bryanhiestand
Copy link
Author

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

@rossmcdonald
Copy link
Owner

Fixed with #36

rossmcdonald pushed a commit that referenced this issue Oct 26, 2018
* #19 - add logic to support amazon linux properly

* #37 - removing neo4j process monitoring from default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants