Question: How to define variables in the task template?
Question
I am currently trying to migrate from Ansible AWX to Semaphore. In Ansible AWX I have the option to define variables only for a template. How can I do this in Semaphore?
Below is a screenshot of how I do it in Ansible AWX:
I found the option to create a Variable Groups in Semaphore, but I need to define the variables per template. If I am going to use Variable Groups I will need to create a Variable Group for each template.
Is there a simpler way to do this?
Related to
Ansible (task execution)
Looks like a useful ability. But currently it is not possible. I think we will add this in 2.14 as part of this feature: https://github.com/semaphoreui/semaphore/issues/2612
Looks like a useful ability. But currently it is not possible. I think we will add this in 2.14 as part of this feature: #2612
@fiftin I opened a new pull request to add this feature: https://github.com/semaphoreui/semaphore/pull/2872
Hello @joaomarcos85 Did you manage to handle the extra variables?
@fiftin I saw that the pull request was rejected, what is current best practice to specify values of variables in task template? I would like to provide values to vars_prompt of my ansible playbook.
@mickaeltardy you should use variable groups
@mickaeltardy @fiftin Currently, Currently, for each template I have to create a variable group. Therefore, when I need to edit the extra variable values of a template, I have to search for the extra variable group and edit it. Since in my case I don’t reuse the same variable group in more than one template, I always need to have the same number of variable groups as the number of templates.
@mickaeltardy @fiftin If at least in the template edit modal there were an option to open the modal for editing the values of the selected variable group, it would already make it much easier to edit the template’s variable values