Skip to content

Commit

Permalink
Remove telegraf repository after switching to online method (#142)
Browse files Browse the repository at this point in the history
* Remove telegraf repository after switching to online method

Co-authored-by: Jérémy CHABERNAUD <jeremy.chabernaud@axians.com>
  • Loading branch information
djerfy and jeremy-chabernaud authored Feb 8, 2021
1 parent d7863b1 commit ecce0ed
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
when:
- telegraf_agent_package_method == "online"

- name: "Debian | Install Telegraf package"
- name: "Debian | Install Telegraf package (repo)"
apt:
name: "{{ telegraf_agent_package }}"
state: "{{ telegraf_agent_package_state }}"
Expand All @@ -92,7 +92,7 @@
when:
- telegraf_agent_package_method == "repo"

- name: "Debian | Install Telegraf package"
- name: "Debian | Install Telegraf package (online)"
apt:
deb: "{{ telegraf_agent_package_path }}/{{ telegraf_agent_package }}"
state: "present"
Expand All @@ -102,3 +102,11 @@
become: yes
when:
- telegraf_agent_package_method == "online" or telegraf_agent_package_method == "offline"

- name: "Debian | Remove repository (online/offline install)"
file:
path: "/etc/apt/sources.list.d/telegraf.list"
state: absent
become: yes
when:
- telegraf_agent_package_method == "online" or telegraf_agent_package_method == "offline"

0 comments on commit ecce0ed

Please sign in to comment.