32 lines
1.1 KiB
YAML
32 lines
1.1 KiB
YAML
- name: Fix InfluxData GPG Key expiration (Trixie/sqv fix)
|
|||
|
|
become: true
|
||
|
|
block:
|
||
|
|
- name: Download the latest InfluxData archive key
|
||
|
|
ansible.builtin.get_url:
|
||
|
|
url: https://repos.influxdata.com/influxdata-archive.key
|
||
|
|
dest: /tmp/influxdata-archive.key
|
||
|
|
mode: '0644'
|
||
|
|
|
||
|
|
- name: Dearmor key for sqv compatibility
|
||
|
|
ansible.builtin.shell: |
|
||
|
|
cat /tmp/influxdata-archive.key | gpg --dearmor > /usr/share/keyrings/influxdata-archive.gpg
|
||
|
|
args:
|
||
|
|
creates: /usr/share/keyrings/influxdata-archive.gpg
|
||
|
|
|
||
|
|
- name: Ensure correct repository configuration
|
||
|
|
ansible.builtin.copy:
|
||
|
|
dest: /etc/apt/sources.list.d/influxdata.list
|
||
|
|
content: "deb [signed-by=/usr/share/keyrings/influxdata-archive.gpg] https://repos.influxdata.com/debian stable main"
|
||
|
|
|
||
|
|
- name: Remove conflicting legacy list files
|
||
|
|
ansible.builtin.file:
|
||
|
|
path: "/etc/apt/sources.list.d/{{ item }}"
|
||
|
|
state: absent
|
||
|
|
loop:
|
||
|
|
- repos_influxdata_com_debian.list
|
||
|
|
- influxdb.list
|
||
|
|
|
||
|
|
- name: Run apt update
|
||
|
|
ansible.builtin.apt:
|
||
|
|
update_cache: yes
|