Hi All,
I’m running into an issue where I’m not sure what is cause, here is the setup:
Debian GNU/Linux buster/sid
ansible 2.7.5
config file = /home/ansible/ansibleGalaxy/ansible.cfg
configured module search path = [u’/home/ansible/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.15+ (default, Nov 28 2018, 16:27:22) [GCC 8.2.0]
Playbook:
Only update the service account
- name: Update Dalet Installer service
win_service:
name: DaletInstallerService
username: .\Administrator
password: toto
start_mode: auto
state: started
Basically I want to update the credential of the service on the target machine.
And whatever setting i’m getting this error message:
fatal: [192.168.56.103]: FAILED! => {
“can_pause_and_continue”: false,
“changed”: false,
“depended_by”: ,
“dependencies”: [
“Afd”,
“Tcpip”
],
“description”: “DaletInstallerService”,
“desktop_interact”: false,
“display_name”: “DaletInstallerService”,
“exists”: true,
“msg”: “Service ‘DaletInstallerService (DaletInstallerService)’ cannot be started due to the following error: Cannot start service DaletInstallerService on computer ‘.’.”,
“name”: “DaletInstallerService”,
“path”: “‘C:\Program Files (x86)\DALET\DaletInstaller\DaletInstallerService.prunsrv.exe’ //RS//DaletInstallerService”,
“start_mode”: “auto”,
“state”: “stopped”,
“username”: “.\Administrator”
}
ERROR! Unexpected Exception, this is probably a bug: ‘ascii’ codec can’t encode character u’\xa0’ in position 29: ordinal not in range(128)
the full traceback was:
Traceback (most recent call last):
File “/usr/bin/ansible-playbook”, line 118, in
exit_code = cli.run()
File “/usr/lib/python2.7/dist-packages/ansible/cli/playbook.py”, line 122, in run
results = pbex.run()
File “/usr/lib/python2.7/dist-packages/ansible/executor/playbook_executor.py”, line 156, in run
result = self._tqm.run(play=play)
File “/usr/lib/python2.7/dist-packages/ansible/executor/task_queue_manager.py”, line 291, in run
play_return = strategy.run(iterator, play_context)
File “/usr/lib/python2.7/dist-packages/ansible/plugins/strategy/linear.py”, line 325, in run
results += self._wait_on_pending_results(iterator)
File “/usr/lib/python2.7/dist-packages/ansible/plugins/strategy/init.py”, line 712, in _wait_on_pending_results
results = self._process_pending_results(iterator)
File “/usr/lib/python2.7/dist-packages/ansible/plugins/strategy/init.py”, line 135, in inner
dbg.cmdloop()
File “/usr/lib/python2.7/dist-packages/ansible/plugins/strategy/init.py”, line 1166, in cmdloop
cmd.Cmd.cmdloop(self)
File “/usr/lib/python2.7/cmd.py”, line 130, in cmdloop
line = raw_input(self.prompt)
UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xa0’ in position 29: ordinal not in range(128)
Still looking for a workaround or a fix, but any input would be welcome to understand the root cause.
Matth