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 Management | Assignee: | satellite6-bugs <satellite6-bugs> |
| Status: | CLOSED ERRATA | QA Contact: | Lukas Pramuk <lpramuk> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.6.0 | CC: | amasolov, b.prins, egolov, naijain, pierre-yves.goubet, roarora |
| Target Milestone: | 6.8.0 | Keywords: | 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
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. Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/29138 has been resolved. *** Bug 1810283 has been marked as a duplicate of this bug. *** 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 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 |