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/f3182fef-b29c-472d-964a-db618bee6796%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.