dj-wasabi / ansible-telegraf

Installing and configuring Telegraf via Ansible for RedHat/Debian/Ubuntu/Windows/Suse.
MIT License
134 stars 116 forks source link

Newer versions of Telegraf fail on Windows #138

Closed billabongrob closed 3 years ago

billabongrob commented 3 years ago

Describe the bug Telegraf appears to have changed their package structure in newer versions. Extracting version 1.10.0 which is the default in the playbook and downloads telegraf-1.10.0_windows_amd64.zip generates a directory name telegraf whereas downloading version 1.16.3 and file telgraf-1.16.3_windows_amd64.zip extracts to a directory named telegraf-1.16.3 Archive: telegraf-1.16.3_windows_amd64.zip creating: telegraf-1.16.3/ inflating: telegraf-1.16.3/telegraf.conf
inflating: telegraf-1.16.3/telegraf.exe

This causes the step task, after Unzip File, named Configure Telegraf to fail in ansible-telegraf/tasks/configure_windows.yml "msg": "Destination directory 'C:\Telegraf\telegraf' does not exist"}

Seems like this began in telegraf version 15? Archive: ../telegraf-1.14.0_windows_amd64.zip creating: telegraf/ inflating: telegraf/telegraf.exe
inflating: telegraf/telegraf.conf

Installation method/version dj-wasabi.telegraf, 0.13.0

Ansible Version

ansible 2.9.13
  config file = /Users/heckelrj/.ansible.cfg
  configured module search path = ['/Users/heckelrj/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.8.2 (default, Mar 11 2020, 00:28:52) [Clang 11.0.0 (clang-1100.0.33.17)]

Targetted hosts Concerns the following OS(es):

Expected behavior Expect that the telegraf be exported into a directory named telegraf perhaps?