From 8e2a909470e2d9aff3a4b1fabfb00c287cf72d7f Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 20 Mar 2021 12:57:04 -0500 Subject: [PATCH] Take default markers. Remove config each reload. --- tasks/general/software/telegraf.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tasks/general/software/telegraf.yml b/tasks/general/software/telegraf.yml index b379723..81e9e99 100644 --- a/tasks/general/software/telegraf.yml +++ b/tasks/general/software/telegraf.yml @@ -48,6 +48,7 @@ - tar xvf {{ telegraf_tar }} - mv {{ telegraf_tar }} ~/TRASH/ - mv telegraf*/usr/bin/telegraf {{ telegraf_exec }} + - mv telegraf* ~/TRASH/ when: ansible_system == "Linux" @@ -62,7 +63,10 @@ # Configuration # -- name: Server | Telegraf | Config +- name: Server | Telegraf | Config 1/2 + shell: mv {{ telegraf_config }} ~/TRASH/ + +- name: Server | Telegraf | Config 2/2 blockinfile: path: "{{ telegraf_config }}" block: | @@ -143,9 +147,7 @@ {{ telegraf_input_temp }} - marker: '{mark} # MANAGED BY ANSIBLE' - marker_begin: '[global_tags]' - marker_end: '# END' + marker: '# {mark} MANAGED BY ANSIBLE - telegraf.yml' state: present create: yes