Ansible show simple variable

15 views
Skip to first unread message

ryad9...@gmail.com

unread,
Mar 29, 2019, 6:55:12 AM3/29/19
to Ansible Project
Hi all,

I have this variable "my_variable" with content "machainedecaractere"

Why when i show this variable with module :

- debug:
       msg: "{{ my_variable }}"

I show on wondows :

ok: [localhost] => {
    "my_variable": {
        "changed": false,
        "failed": false,
        "meta": {
            "machainedecaractere"
        }
    }
}


Someone have an idea why i have this result ?

Thanks community ansible !! ;)

Regards,

Ankit Vashistha

unread,
Mar 29, 2019, 7:18:42 AM3/29/19
to ansible...@googlegroups.com
Use var instead of msg.

- debug:
       var: "{{ my_variable }}"

Regards,
Ankit


--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5f5c05ae-a813-4f8d-b2e0-3b14127fda3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ryad9...@gmail.com

unread,
Mar 29, 2019, 10:09:53 AM3/29/19
to Ansible Project
Hi Ankit,

I have the same result on my windows when i execut my script ansible ;(

I must find issue for that and i update this message.

Thank you !! ;)

Regards,

Le vendredi 29 mars 2019 12:18:42 UTC+1, Ankit a écrit :
Use var instead of msg.

- debug:
       var: "{{ my_variable }}"

Regards,
Ankit


On Fri, Mar 29, 2019 at 4:25 PM <ryad9...@gmail.com> wrote:
Hi all,

I have this variable "my_variable" with content "machainedecaractere"

Why when i show this variable with module :

- debug:
       msg: "{{ my_variable }}"

I show on wondows :

ok: [localhost] => {
    "my_variable": {
        "changed": false,
        "failed": false,
        "meta": {
            "machainedecaractere"
        }
    }
}


Someone have an idea why i have this result ?

Thanks community ansible !! ;)

Regards,

--
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 ansible...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages