Simplify & document unregister

1) Simplify the unregister task, which doesn't require any parameter,
   easier to maintain and less error prone.

2) Document with a playbook example in README how to unregister.

3) Remove useless register, never used later.

Change-Id: Ic1b6674c4608b555f51aa8c6716630c8d96b7fe2
This commit is contained in:
Emilien Macchi 2019-04-11 22:23:14 -04:00
parent 13bf86da1f
commit 0949f34ffb
2 changed files with 12 additions and 7 deletions

View File

@ -103,6 +103,18 @@ Example Playbook with Satellite 6
roles:
- openstack.redhat-subscription
Example Playbook to unregister
------------------------------
::
- hosts: all
tasks:
- name: Unregister the node
include_role:
name: openstack.redhat-subscription
tasks_from: unregister
License
-------

View File

@ -1,12 +1,5 @@
- name: Unregister Red Hat subscription
redhat_subscription:
username: "{{ rhsm_username | default(omit) }}"
password: "{{ rhsm_password | default(omit) }}"
activationkey: "{{ rhsm_activation_key | default(omit) }}"
org_id: "{{ rhsm_org_id | default(omit) }}"
pool_ids: "{{ rhsm_pool_ids | default(omit) }}"
state: "absent"
rhsm_baseurl: "{{ rhsm_baseurl | default(omit) }}"
register: subscrition_result
tags:
- rhsm_unregister