debian-forge-composer/templates/packer/ansible/roles/common/tasks/subscribe.yml
Sanne Raymaekers ca8a05bd3a templates/packer: subscribe packer machines
To avoid a mismatch between the RPMs (which are build using CDN content)
and the packer instances (RHUI, which might be older).
2023-03-03 13:00:05 +01:00

26 lines
723 B
YAML

---
# Subscribe the machine to avoid a mismatch between the RPMs (which are build using CDN content) and
# the packer instances (RHUI, which might be older).
- name: Subscribe
tags:
- subscribe
community.general.redhat_subscription:
activationkey: "{{ RH_ACTIVATION_KEY }}"
org_id: "{{ RH_ORG_ID }}"
- name: Enable repo mgmt through subman
become: yes
tags:
- subscribe
shell: >-
subscription-manager config --rhsm.manage_repos 1
- name: Enable cdn repos
become: yes
tags:
- subscribe
shell: >-
subscription-manager repos \
--enable rhel-9-for-x86_64-appstream-rpms \
--enable rhel-9-for-x86_64-baseos-rpms \
--enable codeready-builder-for-rhel-9-x86_64-rpms