infra.aap_utilities.aap_setup_download
A role to download the latest z-version of the AAP setup tarball for a given minor version (e.g. 2.1 at time of writing).
Shamelessly adapted from Red Hat Ansible Automation Platform 2: Automating the Installer Download and publishing as a Content View in Satellite.
Requirements
You will need a Red Hat Ansible Automation Platform (AAP, hence the name) subscription. Once this is a given, you will be able to create yourself an offline token at https://access.redhat.com/management/api/ (see Getting started with Red Hat APIs for details).
Role Variables
The following input variables are required:
aap_setup_down_offline_tokencontains your offline token as described in the requirements. It has no default value and must be defined.aap_setup_down_versiondefines the minor version to download (e.g.2.5). Defaults to current latest2.5version. The default is the latest version available at time of writing.aap_setup_down_version_patchdefines the patch version to download (e.g12) Defaults to false which will always get latest.aap_setup_down_dest_diris the directory to where you want to download the tarball. It is by default the working directoryaap_setup_working_diralso used by other roles of the collection, or ultimately/var/tmp.aap_setup_down_typecan be eithersetup,setup-bundle,containerized-setup, depending which flavour of the tarball you want to download.aap_setup_rhel_versiondefines the major RHEL version being used (currently 8 or 9). If you are gathering facts you possibly don’t need to specify this as the role will attempt to work out the value required though you will if AAP will be installed on machines on a different OS than the installer will run on. Otherwise the default is 8.aap_setup_containerizedif set totruethe role will download the the containerized installer.aap_setup_archdefine the processor architecture of the installer. Default to “x86_64”
The full path of the downloaded file is stored in the fact aap_setup_down_installer_file so that it can be used for extraction.
Dependencies
None.
Example Playbook
Combined with the role aap_setup_prepare, the following code will download and prepare the installation directory:
- hosts: installationserver
roles:
- { role: infra.aap_utilities.aap_setup_download }
- { role: infra.aap_utilities.aap_setup_prepare }
License
Author Information
Eric Lavarde elavarde@redhat.com, Red Hat Consulting, Principal Architect