HI Alan,

Thank you very much for your reply. I will from now on keep my 
AWX-questions to that specific list.

I found another solution for this which was in the workflow, have a 
"setter_template" that sets variables for the rest of the templates with 
the module *set_stats:*

The module sends the variables as artifacts to all the other templates in 
the workflow and worked for the scenario that we had. You can set an 
arbitrary value in the mandatory survey and set_stats will overwrite that 
specific variable.

Best regards
Tony

Den onsdag 4 mars 2020 kl. 13:12:31 UTC+1 skrev Alan Rominger:
>
> Hi Tony,
>
> There is an email list for the AWX project specifically, and the question 
> would be better asked there.
>
> Templating from user-provided values is specifically disabled by the 
> server, by marking those as unsafe with the Ansible YAML constructor. There 
> is a setting available to control exactly what the scope of variables this 
> is done for. If you are not concerned about the security implications of 
> allowing lunch-time variables to be templated, then that setting should 
> work for you.
>
> Alan
> github: AlanCoding
>
>
> On Wed, Mar 4, 2020 at 4:23 AM Tony Högsten <[email protected] 
> <javascript:>> wrote:
>
>> Hi!
>>
>> We have a master workflow that invokes several other templates, and these 
>> templates have surveys to make it easier for non-ansible users to know what 
>> to pass in them.
>>
>> In the master workflow when we select the given template, we're asked to 
>> insert a value into that field, which is fine. If I attempt to add "{{ 
>> variable_name }}" / {{  variable_name }} (doesn't matter with or without 
>> quotation) into that field, it doesn't get templated in to the variable, 
>> and the variable value is exactly what we wrote in. I can see that when the 
>> template got invoked, that the variable looks like the other variables that 
>> got set in the "extra_variables" field in the template, and those work fine.
>>
>> Is there a way we can work around this? Can we have a playbook that sets 
>> these variables before we invoke it? And let it be blank? Or will the value 
>> from the survey overwrite the "variable_setter_playbook"? Or is there some 
>> other smart way of sending a variables to templates that have surveys? 
>>
>> Best regards, 
>> Tony
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ansible Development" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-devel/60677f7c-cd6b-4a4a-9f0e-d7b31e1e6517%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-devel/60677f7c-cd6b-4a4a-9f0e-d7b31e1e6517%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/7919f1e8-a945-44fe-9da2-8be76fdf9e5c%40googlegroups.com.

Reply via email to