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 doesn't exit with error, if privilege escalation is not enabled. #734

Closed
ghost opened this issue Aug 5, 2020 · 3 comments · Fixed by #6211
Closed
Labels
bug This issue/PR relates to a bug has_pr module module os packaging plugins plugin (any type)

Comments

@ghost
Copy link

ghost commented Aug 5, 2020

SUMMARY

When I use the redhat_subscription module to subscribe a RHEL8 machine without enabling privilege escalation with become=true
, the task doesn't exit with an error. It just keeps waiting for an input it's never going to get.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

redhat_subscription

ANSIBLE VERSION
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/rodli/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.8/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.8.5 (default, Jul 20 2020, 00:00:00) [GCC 10.1.1 20200507 (Red Hat 10.1.1-1)]```

##### CONFIGURATION

```DEFAULT_HOST_LIST(/home/rodli/ansible/ansible.cfg) = ['/home/rodli/ansible/inventory']```

##### OS / ENVIRONMENT

NAME=Fedora
VERSION="32 (Workstation Edition)"
ID=fedora
VERSION_ID=32
VERSION_CODENAME=""
PLATFORM_ID="platform:f32"
PRETTY_NAME="Fedora 32 (Workstation Edition)"
ANSI_COLOR="0;34"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:32"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f32/system-administrators-guide/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=32
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=32
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation


##### STEPS TO REPRODUCE

  • name: Manage RHEL Subscription for Newly Installed System
    hosts: servers
    vars_files:
    • secret.yml

    • name: Register RHEL Sub
      redhat_subscription:
      state: present
      username: "[email protected]"
      password: "{{ access_redhat_password }}"
      pool_ids: <pool_id>

##### EXPECTED RESULTS

The expected result is to have the play fail, and exit with an error saying something along the lines of "privilege escalation is not enabled". 

##### ACTUAL RESULTS

When the above is executed without ```become=true``` , the playbook does not exit with an error.
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are inaccurate, 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 affects_2.10 bug This issue/PR relates to a bug module module needs_triage os packaging plugins plugin (any type) python3 labels Aug 5, 2020
@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

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.

2 participants