mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
redhat_subscription: don't discard vars with key (#5627)
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 <thor@roht.no>
This commit is contained in:
parent
101c957631
commit
f7fa54eed9
2 changed files with 18 additions and 10 deletions
|
@ -0,0 +1,3 @@
|
|||
bugfixes:
|
||||
- redhat_subscription - do not ignore ``consumer_name`` and other variables if ``activationkey`` is specified
|
||||
(https://github.com/ansible-collections/community.general/issues/3486, https://github.com/ansible-collections/community.general/pull/5627).
|
|
@ -411,23 +411,28 @@ class Rhsm(RegistrationBase):
|
|||
if org_id:
|
||||
args.extend(['--org', org_id])
|
||||
|
||||
if auto_attach:
|
||||
args.append('--auto-attach')
|
||||
|
||||
if consumer_type:
|
||||
args.extend(['--type', consumer_type])
|
||||
|
||||
if consumer_name:
|
||||
args.extend(['--name', consumer_name])
|
||||
|
||||
if consumer_id:
|
||||
args.extend(['--consumerid', consumer_id])
|
||||
|
||||
if environment:
|
||||
args.extend(['--environment', environment])
|
||||
|
||||
if activationkey:
|
||||
args.extend(['--activationkey', activationkey])
|
||||
else:
|
||||
if auto_attach:
|
||||
args.append('--auto-attach')
|
||||
if username:
|
||||
args.extend(['--username', username])
|
||||
if password:
|
||||
args.extend(['--password', password])
|
||||
if consumer_type:
|
||||
args.extend(['--type', consumer_type])
|
||||
if consumer_name:
|
||||
args.extend(['--name', consumer_name])
|
||||
if consumer_id:
|
||||
args.extend(['--consumerid', consumer_id])
|
||||
if environment:
|
||||
args.extend(['--environment', environment])
|
||||
|
||||
if release:
|
||||
args.extend(['--release', release])
|
||||
|
|
Loading…
Reference in a new issue