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

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/de424ba5-b456-41ff-b418-56bba7ff0578n%40googlegroups.com.

Reply via email to