### Run the install playbook with example inventory Source: https://github.com/ansible/aap-rag-content/blob/main/aap-product-docs-plaintext/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/containerized_installation/installing-containerized-aap.md Example of running the installation playbook using 'inventory' as the inventory file. ```bash ansible-playbook -i inventory ansible.containerized_installer.install ``` -------------------------------- ### Run the install playbook with example vault and verbosity Source: https://github.com/ansible/aap-rag-content/blob/main/aap-product-docs-plaintext/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/containerized_installation/installing-containerized-aap.md Example of running the installation playbook with 'inventory' and 'vault.yml', prompting for the vault password, and enabling privilege escalation with verbosity. ```bash ansible-playbook -i inventory -e @vault.yml --ask-vault-pass -K -v ansible.containerized_installer.install ``` -------------------------------- ### Run setup script with sudo Source: https://github.com/ansible/aap-rag-content/blob/main/aap-product-docs-plaintext/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/automation_mesh_for_vm_environments/proc-running-setup-script_setting-up.md Execute the setup script using sudo privileges. This is the standard command for running the installer. ```bash $ sudo ./setup.sh ``` -------------------------------- ### Navigate to Online Installer Directory Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/automation_mesh_for_vm_environments/single-page/bf0deb48d5d640aaf8b9f5cf341708a4.md Change the current directory to the setup directory for an online installer. ```bash $ cd ansible-automation-platform-setup-<latest-version> ``` -------------------------------- ### Navigate to Containerized Setup Directory (Online) Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/automation_mesh_for_vm_environments/single-page/bf0deb48d5d640aaf8b9f5cf341708a4.md Change the current directory to the containerized setup source file directory for an online installation. ```bash cd <path-to-source-file>/ansible-automation-platform-containerized-setup-<version_number> ``` -------------------------------- ### Example: Connect to PostgreSQL Server Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/containerized_installation/single-page/42c609b607b5fd59f37a2940b9e42610.md An example of connecting to a PostgreSQL server using specific host, user, and port details. This is part of the setup process when you do not have PostgreSQL admin credentials. ```bash # psql -h db.example.com -U superuser -p 5432 ``` -------------------------------- ### Navigate to Bundled Installer Directory Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/automation_mesh_for_vm_environments/single-page/bf0deb48d5d640aaf8b9f5cf341708a4.md Change the current directory to the setup bundle directory for a bundled installer. ```bash $ cd ansible-automation-platform-setup-bundle-<latest-version> ``` -------------------------------- ### Run RPM Installer Setup Script with Sudo Privileges Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/automation_mesh_for_vm_environments/single-page/bf0deb48d5d640aaf8b9f5cf341708a4.md Execute the setup script for the RPM installation using sudo privileges, specifying the become method. ```bash $ ANSIBLE_BECOME_METHOD='sudo' ANSIBLE_BECOME=True ./setup.sh ``` -------------------------------- ### Ansible Core Pip Installation Examples Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Examples of specifying the ansible-core Python package version for installation via pip. ```yaml ansible_core: package_pip: ansible-core ``` ```yaml ansible_core: package_pip: ansible-core==2.14.3 ``` ```yaml ansible_core: package_pip: https://github.com/example_user/ansible/archive/refs/heads/ansible.tar.gz ``` -------------------------------- ### Setup Development Environment Source: https://github.com/ansible/aap-rag-content/blob/main/README.md Run this command to set up your development environment, including creating a virtual environment and installing project dependencies. ```commandline make setup ``` -------------------------------- ### Ansible Runner Pip Installation Examples Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Examples of specifying the ansible-runner Python package version for installation via pip. ```yaml ansible_runner: package_pip: ansible-runner ``` ```yaml ansible_runner: package_pip: ansible-runner==2.3.2 ``` ```yaml ansible_runner: package_pip: https://github.com/example_user/ansible-runner/archive/refs/heads/ansible-runner.tar.gz ``` -------------------------------- ### Navigate to Containerized Setup Directory (Offline/Bundled) Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/automation_mesh_for_vm_environments/single-page/bf0deb48d5d640aaf8b9f5cf341708a4.md Change the current directory to the containerized setup bundle directory for an offline or bundled installation. ```bash cd <path-to-source-file/ansible-automation-platform-containerized-setup-bundle-<version_number>-<arch_name> ``` -------------------------------- ### Run setup.sh Source: https://github.com/ansible/aap-rag-content/blob/main/aap-product-docs-plaintext/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/operating_ansible_automation_platform/proc-controller-scm-ssh-proxy-config.md Executes the main setup script to finalize the Ansible Automation Platform installation. ```bash # ./setup.sh ``` -------------------------------- ### Verification Log for HTTP Registry Installation Source: https://github.com/ansible/aap-rag-content/blob/main/aap-product-docs-plaintext/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/installing_ansible_plug-ins_for_red_hat_developer_hub/rhdh-add-plugin-config_rhdh-ocp-required-installation.md Example log output indicating a successful installation of a dynamic plug-in using an HTTP plug-in registry. ```log => Successfully installed dynamic plugin http://plugin-registry:8080/ansible-plugin-backstage-rhaap-dynamic-x.y.z.tgz ``` -------------------------------- ### Project Structure Example Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Displays the directory structure of a sample Ansible project before signing. ```bash cd sample-project/ tree -a . ``` -------------------------------- ### Example Path Exposure Configuration Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Example of a path to be exposed to isolated jobs, specifying host and container directories with SELinux options. ```text /var/lib/awx/.ssh:/root/.ssh:O ``` -------------------------------- ### Example requirements.yml for Ansible Builder Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Specifies Ansible collections to be installed in the execution environment. This file is referenced by `execution-environment.yml`. ```yaml --- collections: - name: kubernetes.core ``` -------------------------------- ### ServiceNow ITSM Inventory Configuration Example Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Example configuration for the ServiceNow ITSM inventory plugin. This file defines the plugin to use and specifies query parameters for syncing inventory data. ```yaml plugin: servicenow.itsm.now query: - os: = Linux Red Hat - os: = Windows XP keyed_groups: - key: os prefix: os ``` -------------------------------- ### Download Install Bundle for Automation Mesh Node Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Download the tar file containing TLS certificates, keys, CA, and Receptor configuration to install a new node into the automation mesh. ```bash #!/bin/bash # Example: Download the bundle to a specific directory # Replace "/path/to/download/directory" with your desired location # Replace "bundle.tar.gz" with the actual filename if different # Ensure the target directory exists mkdir -p /path/to/download/directory # Download the bundle (this is a placeholder command, actual download mechanism might vary) # In a real scenario, you would use a tool like curl or wget with the provided URL # For example: # curl -O https:///bundle.tar.gz -o /path/to/download/directory/bundle.tar.gz echo "Install bundle downloaded to /path/to/download/directory/bundle.tar.gz" ``` -------------------------------- ### MANIFEST.in File Example Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Defines which files within an Ansible project should be included in the checksum manifest for signing. ```text include inventory recursive-include playbooks *.yml ``` -------------------------------- ### Terraform Backend Configuration Example (S3) Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Example configuration for a Terraform S3 backend. This data is stored in an environment variable TF_BACKEND_CONFIG_FILE. ```terraform bucket = "my-terraform-state-bucket" key = "path/to/terraform-state-file" region = "us-east-1" access_key = "my-aws-access-key" secret_key = "my-aws-secret-access-key" ``` -------------------------------- ### Podman-style Volume Mount Syntax for Job Settings Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Example of configuring volume mounts for isolated jobs using Podman syntax. This allows exposing host paths to the execution environment. ```json [ "/ssh_config:/etc/ssh/ssh_config.d/:0" ] ``` -------------------------------- ### Successful Verification Output Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Example output confirming that both the GPG signature and checksums of the Ansible project files are valid. ```text [OK ] GPG signature verification succeeded. [OK ] Checksum validation succeeded. ``` -------------------------------- ### Related Field Search Example (Job Templates) Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Illustrates searching for job templates related to a specific project name using the 'job_template.project.name' syntax. ```text job_template.project.name:"A Project" ``` -------------------------------- ### Field Search Example Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Shows how searching a specific field like 'name' with a value translates to an '__icontains' API query parameter. ```http ?name__icontains=localhost ``` -------------------------------- ### YAML format for extra_vars Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md This is an example of how to define extra variables in YAML format for a job template. ```yaml launch_to_orbit: true satellites: - sputnik - explorer - satcom ``` -------------------------------- ### JSON format for extra_vars Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md This is an example of how to define extra variables in JSON format for a job template. ```json { "launch_to_orbit": true, "satellites": ["sputnik", "explorer", "satcom"] } ``` -------------------------------- ### OpenShift/Kubernetes HostPath Configuration Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Example of exposing isolated paths as HostPath volumes in OpenShift or Kubernetes environments. Note the different syntax for specifying paths and options. ```json [ "/mnt2:/mnt2", "/mnt3", "/mnt4:/mnt4:0" ] ``` -------------------------------- ### Configure Instance Group Policies via API Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Use HTTP PATCH requests to update instance group policies. This example shows how to add a specific instance to an instance group's policy list. ```shell HTTP PATCH /api/v2/instance_groups/N/ { "policy_instance_list": ["special-instance"] } ``` -------------------------------- ### Run Ansible Automation Platform Setup Script Source: https://github.com/ansible/aap-rag-content/blob/main/aap-product-docs-plaintext/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/rpm_upgrade/proc-running-setup-script-for-updates.md Execute the `setup.sh` script to start the installation or update process for Red Hat Ansible Automation Platform. Ensure your inventory file is configured before running this command. ```bash $ ./setup.sh ``` -------------------------------- ### Run Initial Portal Setup or Import Configuration Source: https://github.com/ansible/aap-rag-content/blob/main/aap-product-docs-plaintext/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/installing_self-service_automation_portal/self-service-ocp-project-setup-ui_self-service-new-ocp-project.md Use `portal-setup` to launch the initial configuration wizard or import a previously exported configuration file. This command is typically used during initial deployment or migration. ```bash sudo portal-setup # Run the initial configuration wizard sudo portal-setup import # Import a configuration file ``` -------------------------------- ### Job Metadata Dictionary Structure Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md This is an example of the `job_metadata` dictionary structure when rendered for a job. It contains fields that describe the job being executed. ```json {"id": 18, "name": "Project - Space Procedures", "url": "https://host/#/jobs/project/18", "created_by": "admin", "started": "2019-10-26T00:20:45.139356+00:00", "finished": "2019-10-26T00:20:55.769713+00:00", "status": "successful", "traceback": ""} ``` -------------------------------- ### Run setup script for backup Source: https://github.com/ansible/aap-rag-content/blob/main/aap-product-docs-plaintext/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/rpm_installation/backup-using-automation-installer.md Execute the `setup.sh` script to create a verified archive of your platform. Specify the backup destination and enable compression for both archive and database artifacts. ```bash $ ./setup.sh -e 'backup_dest=/ansible/mybackup' -e 'use_archive_compression=true' 'use_db_compression=true @credentials.yml -b ``` -------------------------------- ### Filtering Hosts with Complex Queries Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Provides examples of complex 'host_filter' queries combining host name, group name, and Ansible facts. ```APIDOC ## GET /api/v2/hosts ### Description Retrieves a list of hosts using complex 'host_filter' queries that combine multiple criteria. ### Method GET ### Endpoint /api/v2/hosts ### Parameters #### Query Parameters - **host_filter** (string) - Optional - A complex filter string. Example combining host name, group name, and Ansible facts: `(name=localhost or name=database) and (groups__name=east or groups__name="west coast") and ansible_facts__an`. ### Request Example ``` /api/v2/hosts/?host_filter=(name=localhost or name=database) and (groups__name=east or groups__name="west coast") and ansible_facts__an ``` ``` -------------------------------- ### Filtering Hosts by Ansible Facts Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md Demonstrates how to use the 'host_filter' query parameter with the /api/v2/hosts endpoint to filter hosts based on specific Ansible facts. This example filters for hosts with exactly 8 virtual CPUs. ```APIDOC ## GET /api/v2/hosts ### Description Retrieves a list of hosts, with the ability to filter them based on various criteria including Ansible facts, host name, and group membership. ### Method GET ### Endpoint /api/v2/hosts ### Parameters #### Query Parameters - **host_filter** (string) - Optional - A filter string used to select hosts. This can include host names, group names, and Ansible facts. For example, `ansible_facts__ansible_processor_vcpus=8` filters for hosts with 8 virtual CPUs. The parameter supports grouping with `()`, boolean operators like `and`, relational field referencing with `__`, JSON key path separation with `__`, JSON array indexing with `[]`, and quoted values for strings with spaces. It also accepts "classic" Django queries. ### Request Example ``` /api/v2/hosts?host_filter=ansible_facts__ansible_processor_vcpus=8 ``` ### Response #### Success Response (200) - **hosts** (array) - A list of host objects matching the filter criteria. #### Response Example ```json { "hosts": [ { "id": 1, "name": "example.com", "ansible_facts": { "ansible_processor_vcpus": 8 } } ] } ``` ``` -------------------------------- ### Run the install playbook Source: https://github.com/ansible/aap-rag-content/blob/main/aap-product-docs-plaintext/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/containerized_installation/installing-containerized-aap.md Execute the primary installation playbook. Replace with your actual inventory file. ```bash ansible-playbook -i ansible.containerized_installer.install ``` -------------------------------- ### Ansible Task Success: Validated Mesh Topology Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/single-page/662b01ec927b6a9739ecda26b92b1926.md This example shows the successful outcome of an Ansible task after correcting instance group configurations. It displays the validated mesh topology, including node types and peer information. ```text TASK [ansible.automation_platform_installer.check_config_static : Validate mesh topology] *** ok: [126-addr.tatu.home -> localhost] => {"changed": false, "mesh": {"110-addr.tatu.home": {"node_type": "execution", "peers": [], "receptor_control_filename": "receptor.sock", "receptor_control_service_name": "control", "receptor_listener": true, "receptor_listener_port": 8928, "receptor_listener_protocol": "tcp", "receptor_log_level": "info"}, "126-addr.tatu.home": {"node_type": "control", "peers": ["110-addr.tatu.home"], "receptor_control_filename": "receptor.sock", "receptor_control_service_name": "control", "receptor_listener": false, "receptor_listener_port": 27199, "receptor_listener_protocol": "tcp", "receptor_log_level": "info"}}} ``` -------------------------------- ### Example 'started' Webhook Payload Source: https://github.com/ansible/aap-rag-content/blob/main/aap-product-docs-plaintext/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_automation_execution/con-controller-instance-groups.md Illustrates the JSON structure of a webhook notification when a job starts. ```json {"id": 38, "name": "Demo Job Template", "url": "https://host/#/jobs/playbook/38", "created_by": "bianca", "started": "2020-07-28T19:57:07.888193+00:00", "finished": null, "status": "running", "traceback": "", "inventory": "Demo Inventory", "project": "Demo Project", "playbook": "hello_world.yml", "credential": "Demo Credential", "limit": "", "extra_vars": "{}", "hosts": {}}POST / HTTP/1.1 ``` -------------------------------- ### Create Full Source Environment Backup Source: https://github.com/ansible/aap-rag-content/blob/main/aap-product-docs-plaintext/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/ansible_automation_platform_migration/rpm-source-environment-export.md Execute the setup script with the backup destination and flag to create a complete backup of the source environment. ```bash $ ./setup.sh -e 'backup_dest=/path/to/backup_dir/' -b ``` -------------------------------- ### Inventory Example: Incorrect Hostname Usage Source: https://github.com/ansible/aap-rag-content/blob/main/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/planning_your_installation/single-page/0f6bc36567c5a6c90d569ae4c75ac952.md This example demonstrates an incorrect way to specify hostnames in an inventory file for clustered installations. It shows the use of 'localhost' which is not accepted by automation controller and automation hub installers. ```ini [automationhub] localhost ansible_connection=local hostA hostB.example.com 172.27.0.4 ``` -------------------------------- ### Access Module Documentation Examples Source: https://github.com/ansible/aap-rag-content/blob/main/aap-product-docs-plaintext/red_hat_content/documentation/red_hat_ansible_automation_platform/2.6/using_content_navigator/extension-set-language.md Navigates to the documentation examples section for a specific module within the automation content navigator. ```bash :{{ examples }} ```