Skip to content

Commit

Permalink
[chores] Add InfluxData key using get_url + retries
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Jul 5, 2024
1 parent bd74949 commit 9d4fb2f
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,27 @@
- name: Install system dependencies
apt:
name:
- curl
- rsyslog
cache_valid_time: 3000
state: latest
tags: [influxdb]

- name: Add influxdb key
shell: |
curl -s https://repos.influxdata.com/influxdata-archive_compat.key -o influxdata-archive_compat.key
echo '393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c influxdata-archive_compat.key' | sha256sum -c && cat influxdata-archive_compat.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg > /dev/null
- name: Add InfluxData key
get_url:
url: https://repos.influxdata.com/influxdata-archive_compat.key
dest: /etc/apt/trusted.gpg.d/influxdata-archive_compat.asc
checksum: sha256:393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c
ignore_errors: true
retries: 5
delay: 10
register: result
until: result is success
tags:
- influxdb
- molecule-idempotence-notest

- name: Add influxdb repo
apt_repository:
repo: "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.gpg] https://repos.influxdata.com/{{ ansible_distribution.lower() }} stable main"
repo: "deb [signed-by=/etc/apt/trusted.gpg.d/influxdata-archive_compat.asc] https://repos.influxdata.com/{{ ansible_distribution.lower() }} stable main"
state: present
tags: [influxdb]

Expand Down

0 comments on commit 9d4fb2f

Please sign in to comment.