Deni Bertović
unread,Jul 21, 2020, 10:31:48 AM7/21/20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
Hey there,
I hope that someone can shed some light on this since I'm not really a windows admin.
I have the following task:
- name: Create service via nssm
win_nssm:
name: '{{ filebeat_service_name }}'
application: '{{ filebeat_home }}\filebeat.bat'
state: present
notify: Restart filebeat
And I get the following error, only on windows 7 (windows 10 works fine).
Nssm was installed with the win_chocolatey module and the only difference I was was that on the win10 host it was already there and on the win7 host I got a warning that it needed to be installed first (and the module did all that by itself).
fatal: [x.x.x.x]: FAILED! => {
"changed": false,
"msg": "Error retrieving Application for service \"filebeat\"",
"nssm_error_cmd": "nssm.exe get filebeat Application",
"nssm_error_log": "Parameter \"Application\" is only valid for services managed by NSSM!\r\r\n"
}
Interestingly enough if I fiddle around with win_service and try and create the service, then remove it manually, it works.
Any insight is appreciated.
-Deni