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.

Bug 1785231

Summary: Ansible Variable override to false does not gets reflected on client machine on Red Hat Satellite 6.
Product: Red Hat Satellite Reporter: Amaani S Karimi <akarimi>
Component: Ansible - Configuration ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: medium Docs Contact:
Priority: high    
Version: 6.6.0CC: amasolov, b.prins, egolov, naijain, pierre-yves.goubet, roarora
Target Milestone: 6.8.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman_ansible-5.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 12:59:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 3 Alexey Masolov 2020-02-23 23:04:04 UTC
*** Bug 1805560 has been marked as a duplicate of this bug. ***

Comment 5 Alexey Masolov 2020-02-24 03:24:01 UTC
So, to address the problem with saving boolean parameters as true/false instead of string values 'true'/'false' we need to cherry pick this https://github.com/theforeman/foreman_ansible/pull/293/files into Satellite.

The YAML render should be also fixed by implementing the proposed change. I'll create a PR for that.

Comment 6 Bryan Kearney 2020-02-28 15:00:48 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/29138 has been resolved.

Comment 7 Tomer Brisker 2020-08-24 10:57:08 UTC
*** Bug 1810283 has been marked as a duplicate of this bug. ***

Comment 8 Lukas Pramuk 2020-10-06 08:55:27 UTC
VERIFIED.

@Satellite 6.8.0 Snap18
tfm-rubygem-foreman_ansible-5.1.3-1.el7sat.noarch

by the reproducer described in comment#0 and comment#4:

1) Import the role "linux-system-roles.timesync" and its variables (works for any role with boolean variables)

# ansible-galaxy install -p /etc/ansible/roles linux-system-roles.timesync
# hammer ansible roles import --proxy-id 1
# hammer ansible variables import --proxy-id 1

2) Associate this role to an host

# hammer host ansible-roles assign --name $(hostname) --ansible-roles linux-system-roles.timesync

3) Override variable "timesync_dhcp_ntp_servers" and leave the default value to 'false'

4) Access the YAML page of your host and check for the variable "timesync_dhcp_ntp_servers"

---
parameters:
  timesync_dhcp_ntp_servers: false

>>> boolean parameter set to false is still visible


5) Change the overridden value to 'true' and check its representation in foreman database

# PGPASSWORD=$(awk '/password:/{gsub(/"/,"",$2);print$2}' /etc/foreman/database.yml) psql -U foreman -d foreman -h 127.0.0.1
psql (12.1)
Type "help" for help.

foreman=> select default_value from lookup_keys where key like 'timesync_dhcp_ntp_servers';
 default_value 
---------------
 --- true     +
 ...          +
 
(1 row)

>>> boolean variable is stored as a boolean and not as a string

Comment 11 errata-xmlrpc 2020-10-27 12:59:35 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 (Important: Satellite 6.8 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.

https://access.redhat.com/errata/RHSA-2020:4366