Questo contenuto non è disponibile nella lingua selezionata.

Chapter 7. Maintaining containerized Ansible Automation Platform


Update, backup, restore, uninstall, or reinstall containerized Ansible Automation Platform deployments to support your automation infrastructure.

7.1. Updating containerized Ansible Automation Platform

Perform a patch update for a container-based installation of Ansible Automation Platform from 2.5 to 2.5.x.

Upgrades from 2.4 Containerized Ansible Automation Platform Tech Preview to 2.5 Containerized Ansible Automation Platform are not supported.

Prerequisites

Procedure

  1. Log in to the Red Hat Enterprise Linux host as your dedicated non-root user.
  2. Follow the steps in Downloading Ansible Automation Platform to download the latest version of containerized Ansible Automation Platform.
  3. Copy the downloaded installation program to your Red Hat Enterprise Linux Host.
  4. Edit the inventory file to match your required configuration. You can keep the same parameters from your existing Ansible Automation Platform deployment or you can change the parameters to match any modifications to your environment.
  5. Run the install playbook:

    $ ansible-playbook -i inventory ansible.containerized_installer.install
    • If your privilege escalation requires a password to be entered, append -K to the command. You will then be prompted for the BECOME password.
    • You can use increasing verbosity, up to 4 v’s (-vvvv) to see the details of the installation process. However it is important to note that this can significantly increase installation time, so it is recommended that you use it only as needed or requested by Red Hat support.
  6. The update begins.

7.2. Backing up containerized Ansible Automation Platform

Perform a backup of your container-based installation of Ansible Automation Platform.

Note
  • When backing up Ansible Automation Platform, use the installation program that matches your currently installed version of Ansible Automation Platform.
  • Backup functionality only works with the PostgreSQL versions supported by your current Ansible Automation Platform version. For more information, see System requirements.
  • Backup and restore for content stored in Azure Blob Storage or Amazon S3 must be handled through the vendor portals, as each vendor provides their own backup solutions.

Prerequisites

  • You have logged in to the Red Hat Enterprise Linux host as your dedicated non-root user.

Procedure

  1. Go to the Red Hat Ansible Automation Platform installation directory on your Red Hat Enterprise Linux host.
  2. To control compression of the backup artifacts before they are sent to the host running the backup operation, you can use the following variables in your inventory file:

    1. For control of compression for filesystem related backup files:

      # Global control of compression for filesystem backup files
      use_archive_compression=true
      
      # Component-level control of compression for filesystem backup files
      #controller_use_archive_compression=true
      #eda_use_archive_compression=true
      #gateway_use_archive_compression=true
      #hub_use_archive_compression=true
      #pcp_use_archive_compression=true
      #postgresql_use_archive_compression=true
      #receptor_use_archive_compression=true
      #redis_use_archive_compression=true
    2. For control of compression for database related backup files:

      # Global control of compression for database backup files
      use_db_compression=true
      
      # Component-level control of compression for database backup files
      #controller_use_db_compression=true
      #eda_use_db_compression=true
      #hub_use_db_compression=true
      #gateway_use_db_compression=true
  3. Run the backup playbook:

    $ ansible-playbook -i <path_to_inventory> ansible.containerized_installer.backup

    The backup process creates archives of the following data:

    • PostgreSQL databases
    • Configuration files
    • Data files

Next steps

To customize the backup process, you can use the following variables in your inventory file:

  • Change the backup destination directory from the default ./backups by using the backup_dir variable.
  • Exclude paths that contain duplicated data, such as snapshot subdirectories, by using the hub_data_path_exclude variable. For example, to exclude a .snapshots subdirectory, specify hub_data_path_exclude=['/.snapshots/'] in your inventory file.

    • Alternatively, you can use the command-line interface with the -e flag to pass this variable at runtime:

      $ ansible-playbook -i inventory ansible.containerized_installer.backup -e hub_data_path_exclude="['*/.snapshots/*']"

7.3. Restoring containerized Ansible Automation Platform

Restore your container-based installation of Ansible Automation Platform from a backup, or to a different environment.

Note

When restoring Ansible Automation Platform, use the latest installation program available at the time of the restore. For example, if you are restoring a backup taken from version 2.5-1, use the latest 2.5-x installation program available at the time of the restore.

Restore functionality only works with the PostgreSQL versions supported by your current Ansible Automation Platform version. For more information, see System requirements.

Prerequisites

  • You have logged in to the Red Hat Enterprise Linux host as your dedicated non-root user.
  • You have a backup of your Ansible Automation Platform deployment. For more information, see Backing up container-based Ansible Automation Platform.
  • If restoring to a different environment with the same hostnames, you have performed a fresh installation on the target environment with the same topology as the original (source) environment.
  • You have ensured that the administrator credentials on the target environment match the administrator credentials from the source environment.

Procedure

  1. Go to the installation directory on your Red Hat Enterprise Linux host.
  2. Perform the relevant restoration steps:

    • If you are restoring to the same environment with the same hostnames, run the restore playbook:

      $ ansible-playbook -i <path_to_inventory> ansible.containerized_installer.restore

      This restores the important data deployed by the containerized installer such as:

      • PostgreSQL databases
      • Configuration files
      • Data files

        By default, the backup directory is set to ./backups. You can change this by using the backup_dir variable in your inventory file.

    • If you are restoring to a different environment with different hostnames, perform the following additional steps before running the restore playbook:

      Important

      Restoring to a different environment with different hostnames is not recommended and is intended only as a workaround.

      1. For each component, identify the backup file from the source environment that contains the PostgreSQL dump file.

        For example:

        $ cd ansible-automation-platform-containerized-setup-<version_number>/backups
        $ tar tvf gateway_env1-gateway-node1.tar.gz | grep db
        
        -rw-r--r-- ansible/ansible 4850774 2025-06-30 11:05 aap/backups/awx.db
      2. Copy the backup files from the source environment to the target environment.
      3. Rename the backup files on the target environment to reflect the new node names.

        For example:

        $ cd ansible-automation-platform-containerized-setup-<version_number>/backups
        $ mv gateway_env1-gateway-node1.tar.gz gateway_env2-gateway-node1.tar.gz
      4. For enterprise topologies, ensure that the component backup file containing the component.db file is listed first in its group within the inventory file.

        For example:

        $ cd ansible-automation-platform-containerized-setup-<version_number>
        $ ls backups/gateway*
        
        gateway_env2-gateway-node1.tar.gz
        gateway_env2-gateway-node2.tar.gz
        $ tar tvf backups/gateway_env2-gateway-node1.tar.gz | grep db
        
        -rw-r--r-- ansible/ansible 416687 2025-06-30 11:05 aap/backups/gateway.db
        $ tar tvf backups/gateway_env2-gateway-node2.tar.gz | grep db
        $ vi inventory
        
        [automationgateway]
        env2-gateway-node1
        env2-gateway-node2

7.4. Uninstalling containerized Ansible Automation Platform

Uninstall your container-based installation of Ansible Automation Platform.

Prerequisites

  • You have logged in to the Red Hat Enterprise Linux host as your dedicated non-root user.

Procedure

  1. If you intend to reinstall Ansible Automation Platform and want to use the preserved databases, you must collect the existing secret keys:

    1. First, list the available secrets:

      $ podman secret list
    2. Next, collect the secret keys by running the following command:

      $ podman secret inspect --showsecret <secret_key_variable> | jq -r .[].SecretData

      For example:

      $ podman secret inspect --showsecret controller_secret_key | jq -r .[].SecretData
  2. Run the uninstall playbook:

    $ ansible-playbook -i inventory ansible.containerized_installer.uninstall
    • This stops all systemd units and containers and then deletes all resources used by the containerized installer such as:

      • configuration and data directories and files
      • systemd unit files
      • Podman containers and images
      • RPM packages
    • To keep container images, set the container_keep_images parameter to true.

      $ ansible-playbook -i inventory ansible.containerized_installer.uninstall -e container_keep_images=true
    • To keep PostgreSQL databases, set the postgresql_keep_databases parameter to true.

      $ ansible-playbook -i inventory ansible.containerized_installer.uninstall -e postgresql_keep_databases=true

7.5. Reinstalling containerized Ansible Automation Platform

To reinstall a containerized deployment after uninstalling and preserving the database, follow the steps in Installing containerized Ansible Automation Platform and include the existing secret key value in the playbook command:

$ ansible-playbook -i inventory ansible.containerized_installer.install -e controller_secret_key=<secret_key_value>
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2026 Red Hat
Torna in cima