Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
I can create duplicate ansible variables of the same name for the same role.
These duplicates can be of different types
Duplicates shouldn't be allowed similarly to puppet classes
Version-Release number of selected component (if applicable):
Satellite-6.6.0 Snap14
How reproducible:
deterministic
Steps to Reproduce:
1. Import ansible roles:
# hammer ansible roles import --proxy-id 1
2. Create ansible variable "my_var" assigned to "theforeman.foreman_scap_client" role:
# hammer ansible variables create --variable my_var --variable-type string --ansible-role theforeman.foreman_scap_client
Ansible variable [my_var] was created.
3. Try to create variable of the same name once again:
# hammer ansible variables create --variable my_var --variable-type boolean --ansible-role theforeman.foreman_scap_client
Ansible variable [my_var] was created.
Actual results:
# hammer ansible variables list --search name=my_var
---|----------|---------------|---------|-------------------------------
ID | VARIABLE | DEFAULT VALUE | TYPE | ROLE
---|----------|---------------|---------|-------------------------------
28 | my_var | | boolean | theforeman.foreman_scap_client
27 | my_var | | string | theforeman.foreman_scap_client
---|----------|---------------|---------|-------------------------------
>>> duplicate vars for one role are allowed
Expected results:
2nd "my_var" creation fails with something like
"Validation failed: my_var for the role already exists"
VERIFIED.
@Satellite 6.6.0 Snap21
tfm-rubygem-foreman_ansible-3.0.7.1-1.el7sat.noarch
by the reproducer described in comment#0:
# hammer ansible roles import --proxy-id 1
Result:
The following ansible roles were changed
Imported:
1) RedHatInsights.insights-client
2) theforeman.foreman_scap_client
# hammer ansible variables create --variable my_var --variable-type string --ansible-role theforeman.foreman_scap_client
Ansible variable [my_var] was created.
# hammer ansible variables create --variable my_var --variable-type boolean --ansible-role theforeman.foreman_scap_client
Could not create the ansible variable:
Key has already been taken
>>> duplicate ansible vars for a role are no longer allowed
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2019:3172
Description of problem: I can create duplicate ansible variables of the same name for the same role. These duplicates can be of different types Duplicates shouldn't be allowed similarly to puppet classes Version-Release number of selected component (if applicable): Satellite-6.6.0 Snap14 How reproducible: deterministic Steps to Reproduce: 1. Import ansible roles: # hammer ansible roles import --proxy-id 1 2. Create ansible variable "my_var" assigned to "theforeman.foreman_scap_client" role: # hammer ansible variables create --variable my_var --variable-type string --ansible-role theforeman.foreman_scap_client Ansible variable [my_var] was created. 3. Try to create variable of the same name once again: # hammer ansible variables create --variable my_var --variable-type boolean --ansible-role theforeman.foreman_scap_client Ansible variable [my_var] was created. Actual results: # hammer ansible variables list --search name=my_var ---|----------|---------------|---------|------------------------------- ID | VARIABLE | DEFAULT VALUE | TYPE | ROLE ---|----------|---------------|---------|------------------------------- 28 | my_var | | boolean | theforeman.foreman_scap_client 27 | my_var | | string | theforeman.foreman_scap_client ---|----------|---------------|---------|------------------------------- >>> duplicate vars for one role are allowed Expected results: 2nd "my_var" creation fails with something like "Validation failed: my_var for the role already exists"