Project

General

Profile

Bug #28859

When importing multiple ansible role variables in satellite that have the same variable name, they are silently overwritten.

Added by Tomer Brisker 9 months ago. Updated 5 months ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1777293

Description of problem:

If you try to import some ansible roles in satellite 6.6 that contain the same variable name the GUI will not warn nor give an error but silently import the variables and the last imported variable with the same name wins.

How reproducible:

1. Create two roles that have a default variable with the same name.
2. Import them: only the last variable will be visible/used in the GUI.

Actual results:

Only the last imported variable with the same name will be present/used.

Expected results:

We would expect that the two or more variables would be considered locally to the related role (so not overwriting each other) or at least have a warning message for the user to know that he just overwrote a variable with another in two roles (he could eventually rename them and reimport them again)

Additional info:

If roles are developed by different teams or as often is the case imported from galaxy or the comunity you cannot be sure or enforce that the variable name will be unique for all roles, thus you should foresee this and avoid them to be global, but local to the rule or at least give a warning to take countermeasures by using best practices in variable naming (prefixing with role name etc).


Related issues

Has duplicate Ansible - Bug #29236: When importing multiple ansible role variables in foreman that have the same variable name, they are considered globally unique and not local to the ruleDuplicate

Associated revisions

Revision d555de91 (diff)
Added by Ondřej Ezr 6 months ago

Fixes #28859, #26485 - ansible import variables uniquely per role

History

#1 Updated by Ondřej Ezr 7 months ago

  • Has duplicate Bug #29236: When importing multiple ansible role variables in foreman that have the same variable name, they are considered globally unique and not local to the rule added

#2 Updated by Ondřej Ezr 7 months ago

  • Subject changed from When importing multiple ansible role variables in satellite that have the same variable name, they are silently overwritten. to When importing multiple ansible role variables in satellite that have the same variable name, they are silently overwritten.
  • Pull request https://github.com/theforeman/foreman_ansible/pull/335 added

#3 Updated by Tomer Brisker 7 months ago

  • Assignee set to Ondřej Ezr
  • Status changed from New to Ready For Testing

#4 Updated by Ondřej Ezr 6 months ago

  • Status changed from Ready For Testing to Closed

#5 Updated by Adam Ruzicka 5 months ago

  • Fixed in Releases foreman_ansible 5.1.0 added

Also available in: Atom PDF