Bug 1970132

Summary: [BUG] Invalid choice for template_kind listed for os_default_template module
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: unspecified    
Version: 6.9.0CC: egolov, osousa, zhunting
Target Milestone: 6.12.0Keywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: ansible-collection-redhat-satellite-3.4.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2131790 (view as bug list) Environment:
Last Closed: 2022-11-16 13:32:43 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 2021-06-09 20:58:01 UTC
Description of problem:

Accessing https://cloud.redhat.com/ansible/automation-hub/repo/published/redhat/satellite/content/module/os_default_template will show that someone can select "ptable" as one of the template_kind but there are no such template kind available in Satellite or foreman.


This can cause confusion if someone thinks they can use this module to associate a partition_table with an OS.


The only available template kinds are as follows.

# curl -ksu admin:RedHat1! https://`hostname -f`//api/template_kinds | json_reformat | grep name

            "name": "Bootdisk",
            "name": "PXELinux",
            "name": "PXEGrub",
            "name": "PXEGrub2",
            "name": "iPXE",
            "name": "provision",
            "name": "finish",
            "name": "script",
            "name": "user_data",
            "name": "ZTP",
            "name": "POAP",
            "name": "cloud-init",
            "name": "registration",
            "name": "kexec",


Exact same DATA is present in upstream foreman modules as well

--> https://theforeman.github.io/foreman-ansible-modules/v2.1.0/plugins/os_default_template_module.html#parameter-template_kind 


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

Red Hat Satellite Ansible connection [any version]


How reproducible:
Always

Steps to Reproduce:
NA

Actual results:
NA

Expected results:
NA

Additional info:
NA

Comment 1 Griffin Sullivan 2022-09-09 15:52:30 UTC
Verified in 6.12 snap 10

ptable no longer an option for os_default_template template_kind parameter.

Steps to Reproduce:

1) # ansible-doc -M /usr/share/ansible/collections/ansible_collections/redhat/satellite/plugins/modules os_default_template


Results:
= template_kind
        name of the template kind
        (Choices: Bootdisk, cloud-init, finish, host_init_config, iPXE, job_template, kexec, POAP, provision, PXEGrub, PXEGrub2,
        PXELinux, registration, script, user_data, ZTP)
        type: str


Notes:

The initial link to https://cloud.redhat.com/ansible/automation-hub/repo/published/redhat/satellite/content/module/os_default_template no longer shows ptable either.

Comment 5 errata-xmlrpc 2022-11-16 13:32:43 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.12 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-2022:8506