tools/appsre-ansible: retry subscribing rpmbuild machines

Also unsubscribe after the build is done.
This commit is contained in:
Sanne Raymaekers 2024-08-21 12:48:29 +02:00
parent 2f50ce1b56
commit 9fcbcdb5dc

View file

@ -29,6 +29,9 @@
# RHEL mock templates don't work on RHUI, they use the CDN repos
- name: Subscribe
register: result
retries: 5
until: result is success
community.general.redhat_subscription:
activationkey: "{{ RH_ACTIVATION_KEY }}"
org_id: "{{ RH_ORG_ID }}"
@ -167,3 +170,10 @@
mode: pull
src: /home/ec2-user/rpmbuild/RPMS
dest: /osbuild-composer/templates/packer/ansible/roles/common/files/rpmbuild/{{ ansible_architecture }}
- name: Unsubscribe
register: result
retries: 5
until: result is success
community.general.redhat_subscription:
state: absent