@ is special in bash, use single quotes to avoid interpolation `-u
'{{username}}'`

On Mon, Mar 28, 2016 at 6:00 AM, Cai Elvis <[email protected]> wrote:

> Hi guys
>
> i met a wield issue in ansible when using variable including '@' sign, if
> my variable including @, it will turn to empty totally and the debug
> infomation is hello world, when i  remove @ sign, the result is normal, is
> there anyone could help? thanks in advance! :-)
>
> TASK: [vas | debug username]
> **************************************************
>
> ok: [cnshget04.xxx] => {
>     "msg": "Hello world!"
>
> TASK: [vas | vas installing...]
> ***********************************************
> failed: [cnshget04.xxx] => {"cmd": "/opt/quest/bin/vastool -u ''
>
> task file:
> - name: vas installing...
>   shell: >
>     "{{vastool_binary}}" -u "{{username}}"
>
> default file:
> -sh-4.1$ cat defaults/main.yml  | grep username
> username: 'username'
>
> my playbook:
>     - role: vas
>       username: [email protected]
>
> my ansible version is 1.9.4
>
>
>
>
>
> --
> 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/7b1de730-7594-4f82-aa73-813d0830bafe%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/7b1de730-7594-4f82-aa73-813d0830bafe%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
----------
Brian Coca

-- 
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/CACVha7exiL72j39enwPhuQPwaYqwh%2BpeRcNmzPVO4tQhepgcLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to