-
Feature Request
-
Resolution: Unresolved
-
Undefined
-
None
-
2.4, 2.5
-
False
-
-
False
Feature Overview
Template variables (variables set in the `Variables` section of a job template and with the `Prompt on Launch` option enabled) get passed to the job even when they are deleted from the launch preview. To give an example, a user would like to launch a job template without the template variables. They click the launch button, remove the variables from the launch preview, and click next and launch. When they view the job details, they are able to see the template variables.
There was a bug report opened regarding this and it was closed as "working as expected". The customer would like to see if the Ansible BU would reconsider. Their opinion is that variables removed from the launch preview should not get passed to the launched job.
Background, and strategic fit
Below is the response from an Ansible Engineer who responded to the bug report.
This is fairly unavoidable by the design and is intended. We combine variables from a large number of layers in a number of cases. For instance, you might have a schedule set up that provides variables (handled the same as launch-time prompts), and these variables are combined with workflow variables, and combined with job template variables. If we were not merging variables, everything about this would be unusable.
If someone really wanted to remove a variable, we could have a special token to denote that (similar to how "$encrypted$" is a non-value token to defer to database values), which would remove the key from the variables when the job runs. This could be a coherent RFE, but needs discussion about intent and permissions.
(Optional) Use Cases
- Job template has the `Prompt on Launch` option enabled for the `Variables` section
- Customer clicks to launch job template and the launch preview shows up
- Customer removes any variables they want in the launch preview and clicks the run button
- Viewing the job details shows that the deleted variables are not there
Assumptions
N/A
Out of Scope
N/A