Not tried, but worth trying single quotes and a single backslash
On Tuesday, June 7, 2016 at 2:31:02 PM UTC+1, 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/4e8f345d-b685-47f0-bf8f-724c09b7daae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.