semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

Possible Bug: Clarification on order of extravars assignment between environement and survey vars

Open LOTRg opened this issue 1 year ago • 3 comments

Question

Hello All,

I am trying to setup "defaults" in the environment extra_var section for a some variables and on the task itself I would like to be able to either use the defaults set in the environment or override them with a different value. It doesn't seem like the Survey vars are setting the correct value and the original value in the environment is used.

For example: Setup in the Environment extra variables a var called "LOCAL" and set a value for it to be for example "False" Assign the environment to a task Create the same var "LOCAL" in the survey vars Run the Task and give the "LOCAL" var a value of "True" and enable debugging The value of "LOCAL" is "False".

My understanding is the environment variables are sort of static while the survey variables are to be included on runtime which in my mind SHOULD override the defaults of the environment if they exist.

What is the order of preference for setting the value of the same extra_var when it's setup on the survey var of the task and the environment ?

Also, if this is the intended behavior, what would be the best way to setup this scenario where we would like to have defaults for the playbook but need the ability to override them when needed?

Related to

No response

LOTRg avatar Nov 25 '24 01:11 LOTRg

Any assistance here please ?

LOTRg avatar Nov 27 '24 18:11 LOTRg

Hello, The same problem here too. It seems like semaphore doesn't overrides the variables defined in Variable Group with Survey Variables when the same variable name exists on both of them. What's the point of Survey Variable when it doesn't override the Variable Group?

maktoobgar avatar Feb 12 '25 11:02 maktoobgar

@LOTRg Please if you have access, change the label from question to bug or something that can get someone's attention.

maktoobgar avatar Feb 12 '25 11:02 maktoobgar

We are closing on a year on this, no response. Closing.

LOTRg avatar Jul 11 '25 10:07 LOTRg

@fiftin Thank you for your attention to this .

LOTRg avatar Jul 16 '25 11:07 LOTRg

Fix available in 2.16 (beta).

fiftin avatar Jul 22 '25 17:07 fiftin

Thank you @fiftin .

LOTRg avatar Jul 28 '25 05:07 LOTRg