Due to backslash being added or removed win_command is not working as
expected. It works fine when I pass the path in a variable.
- name: List the user details
win_command: '{{full_cmd}} {{cmd1}}'
Variables are as below:
full_cmd: some command
cmd1: Path="D:\\Program Files\\somepath"
cmd from Output:
"cmd": "some command Path=\"D:\\\\Program Files\\\\somepath\"",
But I want to pass it via a loop. Path is a list obtained via set_fact and
list. Here it doesn't work as backslashes are not there as above.
win_command: '{{command}}"{{item}}" {{cmd2}}'
with_items: "{{path}}"
cmd from Output is:
"cmd": "some command Path=\"D:\\Program Files\\somepath\"",
"item": "D:\\Program Files\\somepath",
Please suggest what is wrong here.
--
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/a38a0dd0-99c5-4a92-b2c9-1f27abf2c41f%40googlegroups.com.