Improved comments, split up role, moved tags and added defaults

- Added some commenting inside of defaults to clarify which variables
  adjust which files

- Split up the role taking items out of main.yml in tasks. This is to
  improve clarity of what each bit of Ansible code is doing.

- Tags were defined for each and every task within the Debian.yml moved
  ths up to main.yml so they don't need repeating every task adding
  clutter.

- Added some extra default plugins, as of current release version these
  are now within the default configuration but were missing from this
  role.

- Added some commenting inside the templates and the top of some tasks
  to clarify where the templated file was coming from.
This commit is contained in:
Rick Box
2018-04-06 12:25:27 +01:00
parent af96592932
commit a49a079664
8 changed files with 68 additions and 67 deletions

View File

@ -1,4 +1,4 @@
# Telegraf configuration
### MANAGED BY {{ role_path|basename }} ANSIBLE ROLE ###
[tags]
{% if telegraf_global_tags is defined and telegraf_global_tags is iterable %}

View File

@ -1,3 +1,5 @@
### MANAGED BY {{ role_path|basename }} ANSIBLE ROLE ###
[[inputs.{{ item.plugin }}]]
{% if item.interval is defined %}
interval = "{{ item.interval }}s"

View File

@ -1,4 +1,4 @@
# Telegraf configuration
### MANAGED BY {{ role_path|basename }} ANSIBLE ROLE ###
[global_tags]
{% if telegraf_global_tags is defined and telegraf_global_tags is iterable %}