1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[redhat_subscription]: fixed force option. (#20667)

`force` option is not unique for non-activationkey registrations and it should
be parsed separately; it is possible to register host with activation key and
force such process.
This commit is contained in:
Kamil Boratyński 2017-01-26 19:28:24 +01:00 committed by Adrian Likins
parent 47892a0034
commit 9d8c1923ab

View file

@ -292,6 +292,9 @@ class Rhsm(RegistrationBase):
args = [SUBMAN_CMD, 'register']
# Generate command arguments
if force_register:
args.extend(['--force'])
if activationkey:
args.extend(['--activationkey', activationkey])
args.extend(['--org', org_id])
@ -308,8 +311,6 @@ class Rhsm(RegistrationBase):
args.extend(['--name', consumer_name])
if consumer_id:
args.extend(['--consumerid', consumer_id])
if force_register:
args.extend(['--force'])
if environment:
args.extend(['--environment', environment])