On Saturday, January 23, 2016 at 7:53:07 AM UTC+5:30, Weiwen Chen wrote:
>
> Help pls. I like to undefine a variable in a task.
>
Setting the variable value to None could be one of the ways. You can try
registering a variable value to 'None' while running the task .
- name: Register the value of FOO
shell: echo VALUE
register: FOO
- name: Set the FOO variable value from stdout
set_fact:
FOO: "{{FOO.stdout}}"
Now when you access the variable FOO you will get the value None .
--
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/c1a2fa50-f2a7-4039-9339-4182665c6af8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.