mirror of
https://github.com/dj-wasabi/ansible-telegraf.git
synced 2025-07-17 08:46:37 +00:00
Removed redundant "telegraf" folder in path (#144)
Fixed issues with paths containing spaces
This commit is contained in:
@ -82,8 +82,8 @@ telegraf_win_logfile: 'C:\\Telegraf\\telegraf.log'
|
|||||||
telegraf_win_include: 'C:\Telegraf\telegraf_agent.d'
|
telegraf_win_include: 'C:\Telegraf\telegraf_agent.d'
|
||||||
telegraf_win_service_args:
|
telegraf_win_service_args:
|
||||||
- -service install
|
- -service install
|
||||||
- -config {{ telegraf_win_install_dir }}\telegraf\telegraf.conf
|
- '-config "{{ telegraf_win_install_dir }}\telegraf.conf"'
|
||||||
- --config-directory {{ telegraf_win_include }}
|
- '--config-directory "{{ telegraf_win_include }}"'
|
||||||
|
|
||||||
telegraf_mac_user: user
|
telegraf_mac_user: user
|
||||||
telegraf_mac_group: admin
|
telegraf_mac_group: admin
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
- name: "Windows | Move extracted directory (newer than 1.15)"
|
- name: "Windows | Move extracted directory (newer than 1.15)"
|
||||||
win_copy:
|
win_copy:
|
||||||
src: '{{ telegraf_win_install_dir }}\telegraf-{{ telegraf_agent_version }}\'
|
src: '{{ telegraf_win_install_dir }}\telegraf-{{ telegraf_agent_version }}\'
|
||||||
dest: '{{ telegraf_win_install_dir }}\telegraf'
|
dest: '{{ telegraf_win_install_dir }}'
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
when: telegraf_agent_version is version('1.15', '>=')
|
when: telegraf_agent_version is version('1.15', '>=')
|
||||||
|
|
||||||
@ -38,14 +38,14 @@
|
|||||||
win_unzip:
|
win_unzip:
|
||||||
src: '{{ telegraf_win_install_dir }}\telegraf-{{ telegraf_agent_version }}_windows_amd64.zip'
|
src: '{{ telegraf_win_install_dir }}\telegraf-{{ telegraf_agent_version }}_windows_amd64.zip'
|
||||||
dest: '{{ telegraf_win_install_dir }}'
|
dest: '{{ telegraf_win_install_dir }}'
|
||||||
creates: '{{ telegraf_win_install_dir }}\telegraf\telegraf.exe'
|
creates: '{{ telegraf_win_install_dir }}\telegraf.exe'
|
||||||
delete_archive: yes
|
delete_archive: yes
|
||||||
when: telegraf_agent_version is version('1.15', '<')
|
when: telegraf_agent_version is version('1.15', '<')
|
||||||
|
|
||||||
- name: "Windows | Configure Telegraf"
|
- name: "Windows | Configure Telegraf"
|
||||||
win_template:
|
win_template:
|
||||||
src: telegraf.conf.j2
|
src: telegraf.conf.j2
|
||||||
dest: '{{ telegraf_win_install_dir }}\telegraf\telegraf.conf'
|
dest: '{{ telegraf_win_install_dir }}\telegraf.conf'
|
||||||
notify: "Restart Windows Telegraf"
|
notify: "Restart Windows Telegraf"
|
||||||
|
|
||||||
- name: "Windows | Copy telegraf extra plugins"
|
- name: "Windows | Copy telegraf extra plugins"
|
||||||
@ -75,7 +75,7 @@
|
|||||||
notify: "Restart Windows Telegraf"
|
notify: "Restart Windows Telegraf"
|
||||||
|
|
||||||
- name: "Windows | Register Service"
|
- name: "Windows | Register Service"
|
||||||
win_command: '{{ telegraf_win_install_dir }}\telegraf\telegraf.exe {{ telegraf_win_service_args | join(" ") }}'
|
win_command: '"{{ telegraf_win_install_dir }}\telegraf.exe" {{ telegraf_win_service_args | join(" ") }}'
|
||||||
register: telegraf_windows_install
|
register: telegraf_windows_install
|
||||||
args:
|
args:
|
||||||
creates: '{{ telegraf_win_install_dir }}\.installed'
|
creates: '{{ telegraf_win_install_dir }}\.installed'
|
||||||
|
Reference in New Issue
Block a user