playbook file
:
#var-test.yml
---

- name: Testing
  hosts: localhost
  gather_facts: no    
  tasks:
    - set_fact:
         var1="var1"
         var2="not var2 name" 
        
    - debug: var=var1
    - debug: var=var2


-------------------------------------------------
the run output:

PLAY [Testing] 
*****************************************************************

TASK [set_fact] 
****************************************************************
ok: [localhost]

TASK [debug] 
*******************************************************************
ok: [localhost] => {
    "var1": "VARIABLE IS NOT DEFINED!"
}

TASK [debug] 
*******************************************************************
ok: [localhost] => {
    "var2": "not var2 name"
}

-- 
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/7ba656dd-0aa7-42c0-a920-e34a27293820%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to