Bug 2174367

Summary: Improve the documentation for redhat.satellite.setting module from Satellite Ansible collections
Product: Red Hat Satellite Reporter: Sayan Das <saydas>
Component: Ansible CollectionAssignee: Evgeni Golov <egolov>
Status: CLOSED ERRATA QA Contact: Griffin Sullivan <gsulliva>
Severity: medium Docs Contact:
Priority: low    
Version: 6.11.4CC: arsingh, egolov, ehelms, gsulliva
Target Milestone: 6.14.0Keywords: Documentation
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: ansible-collection-redhat-satellite-3.10.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-08 14:18:33 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:

Description Sayan Das 2023-03-01 10:31:04 UTC
1. Proposed title of this feature request

[RFE] Improve the documentation for redhat.satellite.setting module from Satellite Ansible collections  


2. What is the nature and description of the request?

Change\Improvement in the module\readme\doc to ensure that users can use the redhat.satellite.setting  ansible module in the right way


3. Why does the customer need this? (List the business requirements here)

If we see any of the following i.e. 

https://console.redhat.com/ansible/automation-hub/repo/published/redhat/satellite/content/module/setting/
/usr/share/ansible/collections/ansible_collections/redhat/satellite/roles/settings/README.md
/usr/share/ansible/collections/ansible_collections/redhat/satellite/plugins/modules/setting.py

It mentions that for "name" parameter we have to use "Name of the Setting". 

Now, If someone goes to Satellite UI --> Administer --> Settings the data they see is "Full Name" and that cannot be used. 

The only way to get the "Name" is by using API or hammer e.g. 

# hammer settings list |  grep ssh_user

or

# hammer settings list --search "ssh_user"
--------------------------|-----------|---------|---------------------------------------------------------------------------------
NAME                      | FULL NAME | VALUE   | DESCRIPTION                                                                     
--------------------------|-----------|---------|---------------------------------------------------------------------------------
remote_execution_ssh_user | SSH User  | ansible | Default user to use for SSH.  You may override per host by setting a paramete...
--------------------------|-----------|---------|---------------------------------------------------------------------------------

Where 

"Name" is remote_execution_ssh_user and to be used with hammer or within the ansible playbook

Full Name is "SSH User" that is reflected in UI. 

But This approach is not clearly documented anywhere and hence causing confusion for the end user to understand what to use or from where to find the right value for the parameter "name".


4. How would the customer like to achieve this? (List the functional requirements here)

Add some texts like this i.e. 

"To see all available settings, run `hammer settings list` on the Foreman\Satellite Server where the string in "NAME" column can be mentioned in "name" parameter"

Or,

""To see all available settings, run `hammer settings list` on the Satellite Server, if there is a setting you wish to modify provide the string in column NAME to the name option below, if your familiar with the settings as they appear in the Web UI those are listed in column FULL NAME""


5. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.

Check those paths or links from point 3 and it should contain appropriate text


6. Is there already an existing RFE upstream or in Red Hat Bugzilla?
No.


7. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?

As soon as possible


8. Is the sales team involved in this request and do they have any additional input?
No.


9. List any affected packages or components.

ansible-collection-redhat-satellite

10. Would the customer be able to assist in testing this functionality if implemented?
Yes


11. Additional information:

NA

Comment 1 Griffin Sullivan 2023-05-04 16:38:03 UTC
Verified on stream snap 12

Documentation for redhat.satellite.setting has been updated with a note about Full Name vs. Name

Steps to reproduce:

1. Go to https://console.redhat.com/ansible/automation-hub/repo/published/redhat/satellite/content/module/setting/

or 

1. # ansible-doc redhat.satellite.setting


Results:
"""
NOTES:
      * To obtain a list of possible settings for your installation, use the
        [redhat.satellite.setting_info] module or the `hammer settings list' command and look
        for the `name' attribute.
      * The web interface by default shows the `full_name' attribute, which can't be used with
        this module.
"""

Comment 4 errata-xmlrpc 2023-11-08 14:18:33 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.14 security and bug fix update), 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-2023:6818