Describe the bug
When it comes to setting the variable telegraf_agent_package Debian is behaving differently from any other distro.
The README states:
"telegraf_agent_package: The name of the Telegraf package to install. When telegraf_agent_package_method is set to online or offline, it needs to have the full path of the file. Example: telegraf_agent_package: /tmp/telegraf.rpm. Default: telegraf_agent_package: telegraf."
For method online setting the full path does not work with Debian.
The culprit seems to be in these two lines, where the package path is built from two variables and telegraf_agent_package is expected to be only the package name:
https://github.com/dj-wasabi/ansible-telegraf/blob/master/tasks/Debian.yml#L75
https://github.com/dj-wasabi/ansible-telegraf/blob/master/tasks/Debian.yml#L97
Compare to e.g. RedHat where only one variable is used which expects the full path:
https://github.com/dj-wasabi/ansible-telegraf/blob/master/tasks/RedHat.yml#L30
Installation method/version
- Github / latest (0.13.2)
- Ansible Galaxy / Ansible 2.9.13
Targeted hosts
Concerns the following OS(es):
Expected behavior
Set variables
telegraf_agent_package_method: online
telegraf_agent_package: /tmp/telegraf.rpm (full package path)
Rollout works for all distros.
Current behavior
Set variables
telegraf_agent_package_method: online
telegraf_agent_package: /tmp/telegraf.rpm (full package path)
-> Rollout fails for Debian. Rollout works for RedHat etc.
Set variables
telegraf_agent_package_method: online
telegraf_agent_package_path: /tmp
telegraf_agent_package: telegraf.rpm
-> Rollout works for Debian only.
Additional context
Because of this bug the variable telegraf_agent_package cannot be configured to universally work with Debian AND the other distros.
You can work around the problem if you are only every using the role for either Debian OR RedHat/... based systems by setting the variables as stated above under "Current behavior". This however does not apply to our setup where we maintain servers running a mixture of those distros.
Describe the bug
When it comes to setting the variable
telegraf_agent_packageDebian is behaving differently from any other distro.The README states:
"telegraf_agent_package: The name of the Telegraf package to install. When telegraf_agent_package_method is set to online or offline, it needs to have the full path of the file. Example: telegraf_agent_package: /tmp/telegraf.rpm. Default: telegraf_agent_package: telegraf."
For method
onlinesetting the full path does not work with Debian.The culprit seems to be in these two lines, where the package path is built from two variables and
telegraf_agent_packageis expected to be only the package name:https://github.com/dj-wasabi/ansible-telegraf/blob/master/tasks/Debian.yml#L75
https://github.com/dj-wasabi/ansible-telegraf/blob/master/tasks/Debian.yml#L97
Compare to e.g. RedHat where only one variable is used which expects the full path:
https://github.com/dj-wasabi/ansible-telegraf/blob/master/tasks/RedHat.yml#L30
Installation method/version
Targeted hosts
Concerns the following OS(es):
Expected behavior
Set variables
telegraf_agent_package_method: onlinetelegraf_agent_package: /tmp/telegraf.rpm(full package path)Rollout works for all distros.
Current behavior
Set variables
telegraf_agent_package_method: onlinetelegraf_agent_package: /tmp/telegraf.rpm(full package path)-> Rollout fails for Debian. Rollout works for RedHat etc.
Set variables
telegraf_agent_package_method: onlinetelegraf_agent_package_path: /tmptelegraf_agent_package: telegraf.rpm-> Rollout works for Debian only.
Additional context
Because of this bug the variable
telegraf_agent_packagecannot be configured to universally work with Debian AND the other distros.You can work around the problem if you are only every using the role for either Debian OR RedHat/... based systems by setting the variables as stated above under "Current behavior". This however does not apply to our setup where we maintain servers running a mixture of those distros.