Thanks for the hint. Unfortunately the variable is defined by CLI with
extra_vars option and set_fact is not effective to it. I think the real
solution is to have set_global module, but not existing yet.
On Friday, January 22, 2016 at 10:30:06 PM UTC-7, Ankit Kulkarni wrote:
>
>
>
> 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/66f80e9f-1e53-48af-bb3b-95c4bc4d9877%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.