Force rhsm re-registration during upgrades.

The redhat-subscription ansible module doesn't cover the case
when a system is already registered via Satellite and we try to
upgrade it's repositories to a new version providing a different
activation key. The role will catch that the system is already
registered and it won't register the new activation key.
This patch passes the rhsm_force_registration option when invoking
redhat-subscription during an upgrade. This way the system will
be unregistered and registered again, activating the new key passed.

Change-Id: I9cd35882e5db47d22df8a456749188c17b48e451
Closes-Bug: #1807987
This commit is contained in:
Jose Luis Franco Arza 2018-12-11 17:17:29 +01:00
parent a0cf19837b
commit 25a4fb7b62

View File

@ -79,4 +79,5 @@ outputs:
- {get_attr: [RoleParametersValue, value, vars]}
# Force only rhsm_repos content to be enabled.
- rhsm_repos_purge: True
- rhsm_force_register: True
when: step|int == 0