Skip to content

Commit

Permalink
Use new way of installing apt keys
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanhorning committed Jul 30, 2024
1 parent 8465f25 commit 4b3d334
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tasks/install-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
name: apt-transport-https
state: present

- name: Import InfluxData GPG signing key [Debian/Ubuntu]
ansible.builtin.apt_key:
url: "{{ telegraf_repo_base_url }}/influxdata-archive_compat.key"
state: present
- name: Install Telegraf apt key [Debian/Ubuntu]
ansible.builtin.get_url:
url: "{{ telegraf_repo_base_url }}/influxdata-archive.key"
dest: "{{ telegraf_repo_apt_key_dest }}"

- name: Add InfluxData repository [Debian/Ubuntu]
ansible.builtin.apt_repository:
repo: deb {{ telegraf_repo_base_url }}/{{ ansible_distribution | lower }} stable main
repo: deb [signed-by={{ telegraf_repo_apt_key_dest }}] {{ telegraf_repo_base_url }}/{{ ansible_distribution | lower }} stable main
state: present

- name: Install Telegraf packages [Debian/Ubuntu]
Expand Down
1 change: 1 addition & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ telegraf_install_version: stable

# Telegraf repo (by Influxdata)
telegraf_repo_base_url: "https://repos.influxdata.com"
telegraf_repo_apt_key_dest: /etc/apt/keyrings/influxdata-archive.asc

# Sane defaults for global settings
telegraf_agent_interval: 10s
Expand Down

0 comments on commit 4b3d334

Please sign in to comment.