Just a guess - but wouldn't debug use python pprint and hence why you see 
\\ in debug?


On Tuesday, June 7, 2016 at 11:31:02 PM UTC+10, Mike Fennemore wrote:
>
> Hi Jon, good call on the \\ , it does now set the fact. However if I run a 
> debug I see it is now set as domain\\user.
>
> On Tuesday, June 7, 2016 at 3:23:44 PM UTC+2, J Hawkesworth wrote:
>>
>> When you are inside double quotes, you usually need double backslashes. 
>>  I've not used the ansible_env syntax but hopefully the following should do 
>> the trick.
>>
>> - set_fact:
>>         my_login: "{{ ansible_env['USERDOMAIN'] }}\\{{ 
>> ansible_env['USERNAME'] }}"
>>
>> Hope this helps,
>>
>> Jon
>>
>> On Tuesday, June 7, 2016 at 2:14:52 PM UTC+1, Mike Fennemore wrote:
>>>
>>> I have a specific use that requires the Domain\User Windows format.
>>> My assumption was
>>> - set_fact:
>>>         my_login: "{{ ansible_env['USERDOMAIN'] }}\{{ 
>>> ansible_env['USERNAME'] }}"
>>>
>>> This doesn't seem to work however. How do I combine the two 
>>> envrionmental variable with a \ between them?
>>>
>>

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/212ffc21-9bf3-4444-bf8c-919184899378%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to