mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 23:31:25 -07:00
Stop passing all the "rhsm_", and "server_" module arguments to
"Rhsm.register()", and thus as arguments for
"subscription-manager register":
- right before calling "Rhsm.register()", "Rhsm.configure()" is called
to configure subscription-manager with all the "rhsm_", and "server_"
arguments; hence, they are already configured
- the passed argument to "--serverurl" is partially wrong:
"Rhsm.register()" passes only the hostname, whereas the other bits
(port and prefix) are supported too; this "works" because port and
prefix were already configured previously, and the lax parsing that
subscription-manager does allows for missing bits
- the parsing done by subscription-manager for "--baseurl" strips out
the URL scheme and always uses https: this means that specifying
"rhsm_baseurl: http://server" as module parameter will be taken as
"https://server" by subscription-manager; since "rhsm_baseurl" is
already configured by "Rhsm.configure()", this issue is gone
(cherry picked from commit 101c957631
)
Co-authored-by: Pino Toscano <ptoscano@redhat.com>
This commit is contained in:
parent
8079aea1ee
commit
efedd0d6e2
3 changed files with 5 additions and 27 deletions
|
@ -92,7 +92,6 @@ TEST_CASES = [
|
|||
),
|
||||
(
|
||||
['/testbin/subscription-manager', 'register',
|
||||
'--serverurl', 'satellite.company.com',
|
||||
'--username', 'admin',
|
||||
'--password', 'admin'],
|
||||
{'check_rc': True, 'expand_user_and_vars': False},
|
||||
|
@ -180,7 +179,6 @@ TEST_CASES = [
|
|||
[
|
||||
'/testbin/subscription-manager',
|
||||
'register',
|
||||
'--serverurl', 'satellite.company.com',
|
||||
'--org', 'admin',
|
||||
'--activationkey', 'some-activation-key'
|
||||
],
|
||||
|
@ -340,9 +338,6 @@ TEST_CASES = [
|
|||
'register',
|
||||
'--force',
|
||||
'--org', 'admin',
|
||||
'--proxy', 'proxy.company.com:12345',
|
||||
'--proxyuser', 'proxy_user',
|
||||
'--proxypassword', 'secret_proxy_password',
|
||||
'--username', 'admin',
|
||||
'--password', 'admin'
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue