---
- name: system subscription register
hosts: rhel-9
become: true
tasks:
- name: rhel subscription unregister
community.general.redhat_subscription:
state: "absent"
command: subscription-manager remove --all
- name: rhel subscription register
community.general.redhat_subscription:
state: present
username: yourlogin
password: "yourPass!"
auto_attach: true
...