Accomodate for InfluxData Key rotation

This commit is contained in:
Bastian Mäuser 2023-02-10 11:28:29 +01:00
parent 4bf5099ab2
commit 806c1b3e51

View File

@ -1,10 +1,23 @@
---
- name: Enable influxdb apt-key
apt_key: url="https://repos.influxdata.com/influxdb.key"
- name: Import Influxdb GPG siging key with store
ansible.builtin.get_url:
url: "https://repos.influxdata.com/influxdata-archive_compat.key"
dest: /etc/apt/trusted.gpg.d/influxdb.key
checksum: "sha256:393e8779c89ac8d958f81f942f9ad7fb82a25e133faddaf92e15b16e6ac9ce4c"
- name: Enable influxdb repository
apt_repository: repo="deb https://repos.influxdata.com/debian {{ ansible_distribution_release }} stable"
- name: Convert key
ansible.builtin.command:
argv:
- gpg
- --dearmor
- /etc/apt/trusted.gpg.d/influxdb.key
creates: /etc/apt/trusted.gpg.d/influxdb.key.gpg
- name: Enable InfluxDB repository
ansible.builtin.apt_repository:
repo: 'deb [signed-by=/etc/apt/trusted.gpg.d/influxdb.key.gpg] https://repos.influxdata.com/debian stable main'
state: present
- name: Install influxdb
apt: name=influxdb