Hi,
I am running a playbook with a task that calls a handler like so:
- name: "Configure zabbix-agent"
win_template:
src: zabbix_agentd.conf.j2
dest: C:\Program Files\Zabbix Agent\zabbix_agentd.conf
newline_sequence: '\n'
trim_blocks: no
notify: restart zabbix-agent
The handler itself is:
- name: restart zabbix-agent
win_service:
name: Zabbix Agent
state: restarted
start_mode: auto
When I run the playbook there are no errors, but when it reaches the end
there is no mention of the handler and it doesn't run.
The funny thing is, when I use the Linux equivalent and run it on a Linux
host, it does work:
- name: restart zabbix-agent
service: name={{ zabbix_agent_service }}
state=restarted
enabled=yes
become: yes
I could just set it as a task, but I don't want the playbook to restart the
service every time it runs, just when something changed.
Any help appreciated
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/473615b0-047b-4990-89db-b7f9e1a69eab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.