This collection contains a single role for using Red Hat Image Builder from console.redhat.com.
An Execution Environment with the required collections/libraries can be found here.
jmespath
- community.general
ansible-galaxy collection install brianaddicks.rh_console_imagebuilder
Generate a Red Hat offline api token here. This value can either be provided as the variable rhsm_offline_token
or the environment variable REDHAT_API_OFFLINE_TOKEN
.
- name: Create image from console.redhat.com
hosts: localhost
connection: local
gather_facts: no
vars:
- rhsm_offline_token: "MYTOKEN"
- imagebuilder_distribution: rhel-9
- imagebuilder_image_name: rhel9_aws
- imagebuilder_image_type: aws
- imagebuilder_image_packages:
- python39
- imagebuilder_architecture: x86_64
- imagebuilder_activation_key: MY_RH_ACTIVATION_KEY
- imagebuilder_organization_id: MY_RH_ORG_ID
- imagebuilder_aws_account_number: MY_AWS_ACCOUNT_ID
tasks:
- ansible.builtin.import_role:
name: brianaddicks.rh_console_imagebuilder.rh_console_imagebuilder