Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redhat_subscription: consumer_name is ignored #3486

Closed
1 task done
smogsy opened this issue Oct 1, 2021 · 5 comments · Fixed by #5627
Closed
1 task done

redhat_subscription: consumer_name is ignored #3486

smogsy opened this issue Oct 1, 2021 · 5 comments · Fixed by #5627
Labels
bug This issue/PR relates to a bug has_pr module module os packaging plugins plugin (any type)

Comments

@smogsy
Copy link

smogsy commented Oct 1, 2021

Summary

When using consumer_name to override name for foreman registration it is ignored during deployment redhat_subscription task: example below

this was reported in 2018 here: ansible/ansible#50502 but looks to be not fixed

example:
redhat_subscription:
org_id: "{{ foreman_default_organisation }}"
activationkey: "{{ foreman_activation_key }}"
consumer_name: "{{ foreman_register_consumer_hostname }}"
force_register: "{{ foreman_register_force | default('no') | bool }}"
auto_attach: yes

Issue Type

Bug Report

Component Name

redhat_subscription

Ansible Version

$ ansible --version
2.9.23

Community.general Version

$ ansible-galaxy collection list community.general
community.general:3.7.0'

Configuration

$ ansible-config dump --only-changed
 redhat_subscription:
    org_id: "{{ foreman_default_organisation }}"
    activationkey: "{{ foreman_activation_key }}"
    consumer_name: "{{ foreman_register_consumer_hostname }}"
    force_register: "{{ foreman_register_force | default('no') | bool }}"
    auto_attach: yes

OS / Environment

CentOS 7 / OSX / Molecule testing

Steps to Reproduce

run task - overriding consumer_name variable with somthing different to hostname
 redhat_subscription:
    org_id: "{{ foreman_default_organisation }}"
    activationkey: "{{ foreman_activation_key }}"
    consumer_name: "{{ foreman_register_consumer_hostname }}"
    force_register: "{{ foreman_register_force | default('no') | bool }}"
    auto_attach: yes

Expected Results

name in foreman should be different to hostname on server if consumer_name is overriden

Actual Results

hostname stays the same

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@smogsy smogsy changed the title redhat_subscription: consumer_name is ignored when activation key is defined redhat_subscription: consumer_name is ignored Oct 1, 2021
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module os packaging plugins plugin (any type) labels Oct 1, 2021
@eschek87
Copy link

Same here with red hat linux 8.5 tested

@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ptoscano pushed a commit to ptoscano/ansible-community.general that referenced this issue Nov 29, 2022
Fixes ansible-collections#3486. From the man-pages of subscription-manager, none of the
parameters used are tied to the activationkey except the two that remain
in its else-clause.

Note that type is not mentioned in the man-pages on 7.6 (at least), but
is still present and available.
@ptoscano
Copy link
Contributor

Hi folks,

since the old PR (ansible/ansible#60266) that was done by @thor was IMHO good, I took the liberty of porting it to this repository (community.general): #5627

ptoscano pushed a commit to ptoscano/ansible-community.general that referenced this issue Nov 29, 2022
Fixes ansible-collections#3486. From the man-pages of subscription-manager, none of the
parameters used are tied to the activationkey except the two that remain
in its else-clause.

Note that type is not mentioned in the man-pages on 7.6 (at least), but
is still present and available.
ptoscano pushed a commit to ptoscano/ansible-community.general that referenced this issue Nov 29, 2022
Fixes ansible-collections#3486. From the man-pages of subscription-manager, none of the
parameters used are tied to the activationkey except the two that remain
in its else-clause.

Note that type is not mentioned in the man-pages on 7.6 (at least), but
is still present and available.
felixfontein pushed a commit that referenced this issue Nov 30, 2022
Fixes #3486. From the man-pages of subscription-manager, none of the
parameters used are tied to the activationkey except the two that remain
in its else-clause.

Note that type is not mentioned in the man-pages on 7.6 (at least), but
is still present and available.

Co-authored-by: Thor K. H <[email protected]>
patchback bot pushed a commit that referenced this issue Nov 30, 2022
Fixes #3486. From the man-pages of subscription-manager, none of the
parameters used are tied to the activationkey except the two that remain
in its else-clause.

Note that type is not mentioned in the man-pages on 7.6 (at least), but
is still present and available.

Co-authored-by: Thor K. H <[email protected]>
(cherry picked from commit f7fa54e)
felixfontein pushed a commit that referenced this issue Nov 30, 2022
Fixes #3486. From the man-pages of subscription-manager, none of the
parameters used are tied to the activationkey except the two that remain
in its else-clause.

Note that type is not mentioned in the man-pages on 7.6 (at least), but
is still present and available.

Co-authored-by: Thor K. H <[email protected]>
(cherry picked from commit f7fa54e)

Co-authored-by: Pino Toscano <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug has_pr module module os packaging plugins plugin (any type)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants