copr-builders: even unregistering fails

Ansible fails with stderro like:
/usr/sbin/subscription-manager unsubscribe --all
Usage: subscription-manager MODULE-NAME
[MODULE-OPTIONS] [--help]
Primary Modules:
  attach         Attach a specified subscription to the registered system
  list           List subscription and product information for this system
....

Unregister manually.
This commit is contained in:
Pavel Raiskup 2022-01-17 14:57:26 +01:00
parent f546a6fd96
commit 1166d6acdf

View file

@ -105,8 +105,7 @@
register: subscription
- name: Cleanup subscription before failure
community.general.redhat_subscription:
state: absent
shell: subscription-manager unregister
when: subscription.failed
- fail: msg="Could not subscribe"