I just had a quick look, all log output in ansible is done via python
Logger objects. So, I'm not sure if the \\ is actually the representation
of you data structure of if the \\ is a result of outputting the data
structure via debug.
On Tuesday, June 7, 2016 at 11:50:32 PM UTC+10, Christoph Wegener wrote:
>
> 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/77d4f3f7-2886-461d-82b0-f5725deb1cab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.