templates/packer/ansible: fix unregister

The community redhat_subscription module calls `subscription-manager
unsusbscribe`, which doesn't exist. Use shell for now.
This commit is contained in:
Sanne Raymaekers 2023-03-03 15:01:48 +01:00 committed by Tomáš Hozza
parent 3f9da9df33
commit c1032f31e4
3 changed files with 10 additions and 9 deletions

View file

@ -12,8 +12,8 @@
# Configure the worker.
- include_tasks: worker-config.yml
# Unsubscribe
- include_tasks: unsubscribe.yml
# Unregister
- include_tasks: unregister.yml
- name: Ensure SELinux contexts are updated
command: restorecon -Rv /etc

View file

@ -0,0 +1,8 @@
---
- name: Unregister
become: yes
tags:
- subscribe
shell: >-
subscription-manager unregister

View file

@ -1,7 +0,0 @@
---
- name: Unsubscribe
tags:
- subscribe
community.general.redhat_subscription:
state: absent