1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/tests
patchback[bot] 9c411586ea
[PR #6211/9f67cbbe backport][stable-6] rhsm modules: cleanly fail when not run as root (#6218)
rhsm modules: cleanly fail when not run as root (#6211)

subscription-manager on RHEL installs a symlink in /usr/bin to
console-helper (part of usermode), which triggers an interactive prompt
for root credentials when run as user. It seems that console-helper
does not handle well non-interactive contexts (e.g. without a TTY for
input), and thus it will hang waiting for input when run as user in an
Ansible task.

Since subscription-manager requires root already anyway (and it will
fail when explicitly run as user), then apply the same logic locally on
all the modules that interact with it: redhat_subscription,
rhsm_release, and rhsm_repository.

(cherry picked from commit 9f67cbbe36)

Co-authored-by: Pino Toscano <ptoscano@redhat.com>
2023-03-22 17:57:46 +00:00
..
integration/targets [PR #6175/1ddcdc63 backport][stable-6] Mark monit integration tests as unstable (#6178) 2023-03-12 15:50:18 +01:00
sanity [PR #5829/4c4ef80c backport][stable-6] yarn: Fix state=latest not working with global=true (#5992) 2023-02-13 22:07:12 +01:00
unit [PR #6211/9f67cbbe backport][stable-6] rhsm modules: cleanly fail when not run as root (#6218) 2023-03-22 17:57:46 +00:00
utils [stable-6] Run tests with EOL ansible-core versions in GHA (#6069) 2023-02-24 12:50:57 +01:00
.gitignore Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
config.yml Add default license header to files which have no copyright or license header yet (#5074) 2022-08-05 14:03:38 +02:00
requirements.yml Add default license header to files which have no copyright or license header yet (#5074) 2022-08-05 14:03:38 +02:00