# win\_nssm

**URL:** <https://forum.ansible.com/t/win-nssm/31097>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [August 22, 2019, 7:54am UTC](https://forum.ansible.com/t/win-nssm/31097 "2019-08-22T07:54:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manish\_Kumar](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@Manish\_Kumar](https://forum.ansible.com/u/Manish_Kumar)\
**Post date:** [August 22, 2019, 7:54am UTC](https://forum.ansible.com/t/win-nssm/31097/1 "2019-08-22T07:54:33Z")

</div>

Hi All,

getting below error so you have any idea about it ?

ERROR! Syntax Error while loading YAML.  
mapping values are not allowed in this context

The error appears to be in ‘/home/manish/mk/ansible/install\_exe.yml’: line 6, column 13, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Install & start application as Windows service (via nssm)  
win\_nssm:  
^ here

Playbook

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [August 22, 2019, 8:00am UTC](https://forum.ansible.com/t/win-nssm/31097/2 "2019-08-22T08:00:56Z")

</div>

Curly braces put you in jinja context, and I don't think  
"C:\Users\Administrator\Downloads" is a variable.  
According to the docs application is "The application binary".

---

<div class="post-metadata">

**Author:** ![Manish\_Kumar](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@Manish\_Kumar](https://forum.ansible.com/u/Manish_Kumar)\
**Post date:** [August 22, 2019, 12:33pm UTC](https://forum.ansible.com/t/win-nssm/31097/3 "2019-08-22T12:33:39Z")

</div>

Please share in case play book is available to install notepad++ which is already downloaded in the window server .

---

<div class="post-metadata">

**Author:** ![MKPhil](https://avatars.discourse-cdn.com/v4/letter/m/9e8a1a/32.png) [@MKPhil](https://forum.ansible.com/u/MKPhil)\
**Post date:** [August 22, 2019, 2:24pm UTC](https://forum.ansible.com/t/win-nssm/31097/4 "2019-08-22T14:24:54Z")

</div>

win\_nssm is for creating windows services with nssm (the Non-Sucking Service Manager). What you probably want is win\_command ([https://docs.ansible.com/ansible/latest/modules/win\_command\_module.html](https://docs.ansible.com/ansible/latest/modules/win_command_module.html)) so something like:

`

---

<div class="post-metadata">

**Author:** ![Manish\_Kumar](https://avatars.discourse-cdn.com/v4/letter/m/d07c76/32.png) [@Manish\_Kumar](https://forum.ansible.com/u/Manish_Kumar)\
**Post date:** [August 22, 2019, 4:24pm UTC](https://forum.ansible.com/t/win-nssm/31097/5 "2019-08-22T16:24:27Z")

</div>

getting below error :

ERROR! Syntax Error while loading YAML.  
did not find expected hexdecimal number

The error appears to be in ‘/home/manish/mk/ansible/install\_pkg.yml’: line 6, column 25, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

tasks:

- win\_command: “C:\Users\Administrator\Downloads\npp.7.7.1.Installer.exe”  
^ here  
This one looks easy to fix. It seems that there is a value started  
with a quote, and the YAML parser is expecting to see the line ended  
with the same kind of quote. For instance:

when: “ok” in result.stdout

Could be written as:

when: ‘“ok” in result.stdout’

Or equivalently:

when: “‘ok’ in result.stdout”
