Bug 1744521 - There is no way to identify the overriden Ansible variables while creating or editing an existing host
Summary: There is no way to identify the overriden Ansible variables while creating or...
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible
Version: 6.6.0
Hardware: x86_64
OS: Linux
medium vote
Target Milestone: 6.11.0
Assignee: satellite6-bugs
QA Contact: Sam Bible
: 1860611 1866830 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2019-08-22 10:21 UTC by Mihir Lele
Modified: 2022-07-05 14:28 UTC (History)
14 users (show)

Fixed In Version: tfm-rubygem-foreman_ansible-7.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2022-07-05 14:27:54 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25159 0 Normal Ready For Testing Ansible variables overrides on hosts/edit page 2021-06-21 19:00:17 UTC
Red Hat Issue Tracker SAT-675 0 None None None 2021-10-15 15:12:06 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:28:06 UTC

Description Mihir Lele 2019-08-22 10:21:57 UTC
Description of problem:

There is no way to identify the overridden Ansible variables while creating or editing an existing host. Satellite also does not provide the option to override the overridden variables like it does with puppet. If any puppet class is overridden with a value, then it is visible under "Puppet class parameters" and also provides an option to override the value while creating a new host. This option seems to be absent with the Ansible variables.

Version-Release number of selected component (if applicable): 6.6 beta

How reproducible: Always

Steps to Reproduce:
1.  Override a Ansible variable for a Ansible role.
2.  Then try creating a new host and associate the Ansible role with the host and you will never know that some of the variables are overridden unless you go to the Ansible variables page.

Comment 3 Ondřej Pražák 2019-11-18 14:59:11 UTC
Connecting redmine issue https://projects.theforeman.org/issues/25159 from this bug

Comment 4 Tomer Brisker 2020-08-24 10:56:07 UTC
*** Bug 1866830 has been marked as a duplicate of this bug. ***

Comment 5 Tomer Brisker 2020-08-24 11:09:19 UTC
*** Bug 1860611 has been marked as a duplicate of this bug. ***

Comment 7 Sean O'Keeffe 2020-12-09 14:45:19 UTC
*** Bug 1871180 has been marked as a duplicate of this bug. ***

Comment 10 Matthew LeSieur 2021-07-21 15:43:32 UTC
Satellite 6.9 documentation states Ansible variables can be overridden at the Host and Host Group level, but my experience is this is not true.  Specifically, the documentation says:

"To use the Ansible variable, add the variable as a parameter to your host or host group, or add the variable as a global parameter." [1]

I was surprised to find I can't set Ansible variables at the Host or Host Group level.  Also, maybe related, Ansible variables are not included when Ansible uses Satellite as an inventory source (redhat.satellite.foreman and theforeman.foreman.foreman inventory plugins).  Puppet class variables are included with a host's inventory, but not Ansible variables.

Matthew LeSieur

[1] https://access.redhat.com/documentation/en-us/red_hat_satellite/6.9/html/configuring_satellite_to_use_ansible/getting-started-with-ansible_ansible#overriding-Ansible-variables_ansible

Comment 11 Matthew LeSieur 2021-07-28 20:23:06 UTC
Correction to my previous comment (comment #10).  Puppet class variables are not included with a host's inventory when queried using redhat.satellite.foreman or theforeman.foreman.foreman inventory plugins. 

Matthew LeSieur

Comment 12 Marek Hulan 2021-10-15 15:12:07 UTC
We are working on displaying the Ansible roles and variables assigned to the host as part of the new host detail page. Users will be also able to override the values from there directly, without going the the complex host edit form. The similar experience for host groups may come later.

Comment 14 Ondřej Ezr 2021-12-15 14:49:26 UTC
This will be included in Sat 7.0 as part of the new Host Details page, needs the new version of foreman_ansible plugin (7.0).

Comment 15 Sam Bible 2022-05-04 17:32:25 UTC
Verified on:
Sat 6.11 - 18

Steps to Verify:
1) Create a host.
2) Assign the host an ansible role that includes an overridden variable
3) Navigate to the Host Details page

Actual Results:
Under the Ansible tab, and then the Variables tab, you can see the overridden variable and what it's been set to. You can also change this in the same tab,
either changing the override value, or remove the override.

Expected Results:
Overridden variables are visible as part of the Host Details page.

Comment 18 errata-xmlrpc 2022-07-05 14:27:54 UTC
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 (Moderate: Satellite 6.11 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.