Project

General

Profile

Actions

Bug #28859

closed

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

Added by Tomer Brisker about 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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 1 (0 open1 closed)

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 ruleDuplicateActions
Actions #1

Updated by Ondřej Ezr about 4 years 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
Actions #2

Updated by Ondřej Ezr about 4 years 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
Actions #3

Updated by Tomer Brisker about 4 years ago

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

Updated by Ondřej Ezr about 4 years ago

  • Status changed from Ready For Testing to Closed
Actions #5

Updated by Adam Ruzicka almost 4 years ago

  • Fixed in Releases foreman_ansible 5.1.0 added
Actions

Also available in: Atom PDF