Add variable to decide if telegraf systemd service is enabled
Firstly - thanks for the excellent ansible role. If I can suggest a relatively minor issue/improvement....
In the scenario where you are running the ansible role as a part of creating a machine image (e.g. AWS AMI, VirtualBox OVF, etc..) then you may not want Telegraf to start automatically because any telegraf outputs from the "machine-image building VM" are junk and unwanted.
Such outputs would be :
- do not want telegraf log file to contain lines from the machine image building VM
- do not want the output information (stats, logs) to go to your output databases e.g. InfluxDB
Ideally one should be able to install Telegraf with the option to disable the systemd service. The systemd service can then be explicitly Enabled and Started when the machine image (e.g. AWS AMI) is deployed as an EC2 instance.
The change to ansible is small. I can create a fork and supply the code change if you think it is a good idea.