unregister: use command to remove the subscription

The RHSM module is broken when unregistering:
https://github.com/ansible/ansible/pull/55468

The new command to unregister is 'remove':

$ subscription-manager -h
remove         Remove all or specific subscriptions from this system
unsubscribe    Deprecated, see remove

And also requires one of --serial, --pool or --all.

$ subscription-manager remove
Error: This command requires that you specify one of --serial, --pool or --all.

Change-Id: I439130e289bc039d718781c43f0fdfef1c31b8be
This commit is contained in:
Emilien Macchi 2019-04-17 18:40:29 -04:00
parent 0949f34ffb
commit 429bc833aa
1 changed files with 1 additions and 2 deletions

View File

@ -1,5 +1,4 @@
- name: Unregister Red Hat subscription
redhat_subscription:
state: "absent"
command: subscription-manager remove --all
tags:
- rhsm_unregister