Merge pull request #127 from wingcon/master

made service status configurable
This commit is contained in:
Werner Dijkerman
2020-07-10 15:32:35 +02:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
---
telegraf_enabled: True
# defaults file for ansible-telegraf
telegraf_agent_version: 1.10.0

View File

@ -124,8 +124,8 @@
- name: "Start Telegraf (If it wasn't running)"
service:
name: telegraf
state: started
enabled: yes
state: "{{ telegraf_enabled | ternary('started', 'stopped') }}"
enabled: "{{ telegraf_enabled }}"
become: yes
when: not telegraf_agent_docker