### Create Hosts File for Single-Node Installation Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/install-private-hub2.3/awx-InstallingOracleLinuxAutomationManager.html Creates the 'hosts' file from the example for configuring the target node. ```bash cd ~/single_node cp hosts.singlenode.example hosts ``` -------------------------------- ### Get Instance Install Bundle List Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/op-api-v2-instances-id-install_bundle-get.html Fetches a paginated list of install bundles for a given instance ID. ```APIDOC ## GET /api/v2/instances/{id}/install_bundle/ ### Description Retrieves a list of install bundles for a specific instance. ### Method GET ### Endpoint /api/v2/instances/{id}/install_bundle/ ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the instance. #### Query Parameters - **page** (integer) - Optional - A page number within the paginated result set. - **page_size** (integer) - Optional - Number of results to return per page. - **search** (string) - Optional - A search term. ``` -------------------------------- ### Instances - Instances Install Bundle List Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/op-api-v2-job_templates-id-labels-post.html Lists installable bundles for instances. ```APIDOC ## GET /api/v2/instances/install_bundle_list/ ### Description Lists installable bundles for instances. ### Method GET ### Endpoint /api/v2/instances/install_bundle_list/ ``` -------------------------------- ### Instances Install Bundle List Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/op-api-v2-analytics-job_explorer_options-get.html Lists available bundles for instance installation. ```APIDOC ## GET /instances/install_bundles ### Description Lists available bundles for instance installation. ### Method GET ### Endpoint /instances/install_bundles ``` -------------------------------- ### Instances Install Bundle List Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/op-api-v2-instances-id-install_bundle-get.html Retrieves a list of installable bundles for an instance. ```APIDOC ## GET /api/v2/instances/{id}/install_bundle/ ### Description Retrieves a list of installable bundles for a specific instance. ### Method GET ### Endpoint /api/v2/instances/{id}/install_bundle/ ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the instance. ``` -------------------------------- ### Instances Install Bundle List Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/op-api-v2-organizations-id-activity_stream-get.html Retrieves a list of install bundles for instances. ```APIDOC ## GET /api/v2/organizations/{organization_id}/instances/install_bundle/ ### Description Instances install bundle list. ### Method GET ### Endpoint /api/v2/organizations/{organization_id}/instances/install_bundle/ ``` -------------------------------- ### Instances Install Bundle List Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/op-api-v2-applications-id-activity_stream-get.html Retrieves a list of installable bundles for instances. ```APIDOC ## GET /instances/install_bundle_list/ ### Description Lists installable bundles for instances. ### Method GET ### Endpoint /instances/install_bundle_list/ ``` -------------------------------- ### Instances Install Bundle List Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/api-instances.html Lists available install bundles for a specific instance. ```APIDOC ## GET /api/v2/instances/{id}/install_bundle/ ### Description Lists install bundles for an instance. ### Method GET ### Endpoint /api/v2/instances/{id}/install_bundle/ ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the instance. ``` -------------------------------- ### awx CLI Help for Specific Resource Actions Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/cli_intro.html To get help on actions available for a specific resource, append the resource name and the --help option. This example shows help for the 'users' resource. ```bash awx --conf.host https://192.102.118.107 --conf.token h7a3NPiam8Or4px7Kkoe87cWcTeixz users --help ``` -------------------------------- ### Install PostgreSQL Server Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/install2.3/awx_preparing_hosts.html Install the PostgreSQL server package. ```bash sudo dnf install postgresql-server ``` -------------------------------- ### Enable and Start PostgreSQL Service Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/install-private-hub2.3/awx-InstallingOracleLinuxAutomationManager.html Enables the PostgreSQL service to start automatically on boot and starts it immediately. ```bash sudo systemctl enable --now postgresql ``` -------------------------------- ### Install Private Automation Hub Installer Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/install-private-hub2.3/awx-InstallingOracleLinuxAutomationManager.html Installs the necessary package for the Private Automation Hub installer. ```bash sudo dnf install ol-private-automation-hub-installer ``` -------------------------------- ### Example cURL GET Request to Users API Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/use-curl.html Demonstrates a practical example of using cURL to send a GET request to the users API endpoint. This includes an authentication token and a specific IP address for the server. ```bash curl -i -H "Authorization: Bearer pVQoc51Apt4LNrXrNzoSbaMCDzjK8B" -X GET https://192.102.118.107/api/v2/users/ ``` -------------------------------- ### Install PostgreSQL Contrib Package Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/install-private-hub2.3/awx-InstallingOracleLinuxAutomationManager.html Installs the PostgreSQL contrib package, which may be required for remote database setups. ```bash sudo dnf install postgresql-contrib ``` -------------------------------- ### Install Olam-API CLI Package Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/use-cli.html Install the Oracle Linux Automation Manager Command-Line Interface package using dnf. Ensure your system meets the prerequisites outlined in the installation guide. ```bash sudo dnf install ol-automation-manager-cli ``` -------------------------------- ### Simple Survey Specification Example Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/op-api-v2-workflow_job_templates-id-survey_spec-delete.html This is a basic example of a survey specification for a workflow job template. It includes a text input question. Use this as a starting point for defining simple surveys. ```json { "name": "Simple Survey", "description": "Description of the simple survey", "spec": [ { "type": "text", "question_name": "example question", "question_description": "What is your favorite color?", "variable": "favorite_color", "required": false, "default": "blue" } ] } ``` -------------------------------- ### Instances Install Bundle List Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/swagger.json Lists install bundles for a specific instance with search and pagination capabilities. ```APIDOC ## GET /api/v2/instances/{id}/install_bundle/ ### Description Lists install bundles for a specific instance with search and pagination capabilities. ### Method GET ### Endpoint /api/v2/instances/{id}/install_bundle/ ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the instance. #### Query Parameters - **search** (string) - Optional - A search term. - **page** (integer) - Optional - A page number within the paginated result set. - **page_size** (integer) - Optional - Number of results to return per page. ### Response #### Success Response (200) - **count** (integer) - The total number of results. - **next** (string) - The URI for the next page of results. - **previous** (string) - The URI for the previous page of results. - **results** (array) - An array of Instance objects. ``` -------------------------------- ### System Job Sorting Example Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/swagger.json To specify that system jobs are returned in a particular order, use the 'order_by' query string parameter on the GET request. ```http GET /api/v2/system_jobs/?order_by=name ``` -------------------------------- ### Get Inventory Update Details Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/op-api-v2-inventory_updates-id-get.html Retrieves detailed information about a specific inventory update job, including its status, start time, and other relevant metadata. ```APIDOC ## GET /api/v2/inventory_updates/{id} ### Description Retrieves details for a specific inventory update job. ### Method GET ### Endpoint /api/v2/inventory_updates/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the inventory update job to retrieve. ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the inventory update job. - **name** (string) - The name of the inventory update job. - **description** (string) - A description of the inventory update job. - **created** (string) - The date and time the job was created. - **modified** (string) - The date and time the job was last modified. - **status** (string) - The current status of the job (e.g., new, running, successful, failed). - **summary_fields** (string) - Summary of related fields. - **type** (string) - The type of the job. - **url** (string) - The URL for the job. - **started** (string) - The date and time the job was queued for starting. - **finished** (string) - The date and time the job finished. - **created_by** (string) - The user who created the job. - **modified_by** (string) - The user who last modified the job. - **job_env** (object) - Environment variables for the job. - **source_vars** (string) - Inventory source variables in YAML or JSON format. - **timeout** (integer) - The amount of time (in seconds) to run before the task is canceled. - **unified_job_template** (string) - The unified job template associated with the job. - **verbosity** (integer) - The verbosity level of the job output. - **work_unit_id** (string) - The Receptor work unit ID associated with this job. #### Response Example { "id": 1, "name": "Example Job", "description": "An example inventory update job.", "created": "2023-10-27T10:00:00Z", "modified": "2023-10-27T10:05:00Z", "status": "successful", "summary_fields": {}, "type": "job", "url": "/api/v2/inventory_updates/1", "started": "2023-10-27T10:01:00Z", "finished": "2023-10-27T10:05:00Z", "created_by": "admin", "modified_by": "admin", "job_env": {}, "source_vars": "---", "timeout": 3600, "unified_job_template": "/api/v2/unified_job_templates/1", "verbosity": 1, "work_unit_id": "abc-123" } ``` -------------------------------- ### Initial Setup and Migration for AWX Upgrade Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/install2.3/awx_upgrading.html Execute these commands as the 'awx' user to perform initial system migration and pull the new execution environment image before upgrading. ```bash sudo su -l awx -s /bin/bash podman system migrate podman pull container-registry.oracle.com/oracle_linux_automation_manager/olam-ee:2.3-ol8 awx-manage migrate awx-manage register_default_execution_environments exit ``` -------------------------------- ### Callback API Host Matching Response Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/op-api-v2-job_templates-id-callback-get.html Example JSON response from a GET request to the callback API, showing the host config key and matching hostnames. ```json { "host_config_key": "HOST_CONFIG_KEY", "matching_hosts": ["hostname"] } ``` -------------------------------- ### Accessing Team Resource via Named URL Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/configuration_settings.html Example of how to retrieve details about a specific team using its named URL. This demonstrates the GET request format for accessing resources. ```APIDOC ## GET /api/v2/teams/team1++org1/ ### Description Retrieves details for a specific team identified by its named URL. ### Method GET ### Endpoint /api/v2/teams/team1++org1/ ### Request Example ```bash curl -i -H "Authorization: Bearer pVQoc51Apt4LNrXrNzoSbaMCDzjK8B" -X GET https://192.102.118.107/api/v2/teams/team1++org1/ ``` ### Response #### Success Response (200) Returns a JSON object containing the team's details, including a `named_url` field in the `related` object. #### Response Example ```json { "id": 2, "type": "team", "url": "/api/v2/teams/2/", "related": { "named_url": "/api/v2/teams/team2++org1/", "created_by": "/api/v2/users/1/" } } ``` ``` -------------------------------- ### Example Ping API Response Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/op-api-v2-ping-get.html This JSON object represents a successful response from the /api/v2/ping/ endpoint, detailing the instance's active node, HA status, installation UUID, and version. ```json { "active_node":"awx_1", "ha":false, "install_uuid":"00000000-0000-0000-0000-000000000000", "instance_groups":[ ], "instances":[ ], "version":"23.7.0" } ``` -------------------------------- ### Instances Install Bundle List for a Project Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/op-api-v2-projects-id-activity_stream-get.html Retrieves a list of installable bundles for instances within a project. ```APIDOC ## GET /projects/{id}/instances/install_bundle_list ### Description Retrieves a list of installable bundles for instances within a project. ### Method GET ### Endpoint /projects/{id}/instances/install_bundle_list ``` -------------------------------- ### Instances Install Bundle List Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/op-api-v2-instances-id-put.html Lists available bundles for instance installation. This is useful for managing software deployments on instances. ```APIDOC ## GET /instances/install_bundle_list/ ### Description Lists available bundles for instance installation. ### Method GET ### Endpoint /instances/install_bundle_list/ ### Response #### Success Response (200) - A list of available bundle names or identifiers for installation. #### Response Example ```json [ "bundle-v1.0", "bundle-v1.1" ] ``` ``` -------------------------------- ### Get Slice Workflow Jobs Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/op-api-v2-job_templates-id-slice_workflow_jobs-get.html Fetches a list of slice workflow jobs. This endpoint provides details such as job ID, status, launch type, and timestamps for when jobs started and finished. ```APIDOC ## GET /api/v2/job_templates/{id}/slice_workflow_jobs/ ### Description Retrieves a list of slice workflow jobs associated with a specific job template. ### Method GET ### Endpoint /api/v2/job_templates/{id}/slice_workflow_jobs/ ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the job template. #### Query Parameters - **failed** (boolean) - Optional - Filter by failed status. - **finished** (string) - Optional - Filter by finished date/time. - **id** (integer) - Optional - Filter by job ID. - **inventory** (integer) - Optional - Filter by inventory ID. - **is_sliced_job** (boolean) - Optional - Filter by sliced job status. - **job_explanation** (string) - Optional - Filter by job explanation. - **job_tags** (string) - Optional - Filter by job tags. - **job_template** (string) - Optional - Filter by job template name. - **launch_type** (string) - Optional - Filter by launch type. Allowed values: "manual", "relaunch", "callback", "scheduled", "dependency", "workflow", "webhook", "sync", "scm". - **launched_by** (string) - Optional - Filter by user who launched the job. - **limit** (string) - Optional - Filter by limit. - **modified** (string) - Optional - Filter by modified date/time. - **name** (string) - Optional - Filter by job name. - **scm_branch** (string) - Optional - Filter by SCM branch. - **skip_tags** (string) - Optional - Filter by skip tags. - **started** (string) - Optional - Filter by started date/time. - **status** (string) - Optional - Filter by job status. Allowed values: "new", "pending", "waiting", "running", "successful", "failed", "error", "canceled". - **type** (string) - Optional - Filter by job type. - **unified_job_template** (string) - Optional - Filter by unified job template. - **url** (string) - Optional - Filter by job URL. - **webhook_credential** (integer) - Optional - Filter by webhook credential ID. - **webhook_guid** (string) - Optional - Filter by webhook GUID. - **webhook_service** (string) - Optional - Filter by webhook service. Allowed values: "github", "gitlab", "bitbucket_dc". - **work_unit_id** (string) - Optional - Filter by work unit ID. ### Response #### Success Response (200) - **id** (integer) - The unique identifier for the job. - **name** (string) - The name of the job. - **status** (string) - The current status of the job. Possible values: "new", "pending", "waiting", "running", "successful", "failed", "error", "canceled". - **created** (string) - The date and time the job was created. - **modified** (string) - The date and time the job was last modified. - **launched_by** (string) - The user who launched the job. - **launch_type** (string) - The type of launch for the job. Possible values: "manual", "relaunch", "callback", "scheduled", "dependency", "workflow", "webhook", "sync", "scm". - **started** (string) - The date and time the job started execution. - **finished** (string) - The date and time the job finished execution. - **job_explanation** (string) - An explanation of the job's state if it could not run. - **inventory** (integer) - The ID of the inventory used for the job. - **limit** (string) - The limit applied to the job. - **scm_branch** (string) - The SCM branch used for the job. - **job_tags** (string) - Tags associated with the job. - **skip_tags** (string) - Tags that cause the job to be skipped. - **is_sliced_job** (boolean) - Indicates if this is a sliced job. - **job_template** (string) - The name of the job template if automatically created for a sliced job run. - **unified_job_template** (string) - The unified job template identifier. - **url** (string) - The URL of the job. - **related** (string) - Related resources. - **summary_fields** (string) - Summary fields of the job. - **type** (string) - The type of the job. - **failed** (boolean) - Indicates if the job failed. - **webhook_credential** (integer) - The ID of the webhook credential. - **webhook_guid** (string) - The unique identifier of the event that triggered the webhook. - **webhook_service** (string) - The service that webhook requests will be accepted from. Possible values: "github", "gitlab", "bitbucket_dc". - **work_unit_id** (string) - The Receptor work unit ID associated with this job. #### Response Example { "example": "{\"count\": 1, \"next\": null, \"previous\": null, \"results\": [{\"id\": 1, \"name\": \"Example Job\", \"status\": \"successful\", \"created\": \"2023-10-27T10:00:00Z\", \"modified\": \"2023-10-27T10:05:00Z\", \"launched_by\": \"admin\", \"launch_type\": \"manual\", \"started\": \"2023-10-27T10:01:00Z\", \"finished\": \"2023-10-27T10:05:00Z\", \"job_explanation\": null, \"inventory\": 1, \"limit\": \"all\", \"scm_branch\": null, \"job_tags\": \"tag1\", \"skip_tags\": null, \"is_sliced_job\": false, \"job_template\": null, \"unified_job_template\": \"/api/v2/unified_job_templates/1/\", \"url\": \"/api/v2/jobs/1/\", \"related\": {\"job_events\": \"/api/v2/jobs/1/job_events/\"}, \"summary_fields\": {\"user\": {\"id\": 1, \"username\": \"admin\"}}, \"type\": \"job\", \"failed\": false, \"webhook_credential\": null, \"webhook_guid\": null, \"webhook_service\": null, \"work_unit_id\": null}]}"} ``` -------------------------------- ### Starting Services After Upgrade Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/install2.3/awx_upgrading.html Start all relevant services on all hosts after completing the upgrade process. ```bash sudo systemctl start receptor-awx sudo systemctl start ol-automation-manager sudo systemctl start nginx ``` -------------------------------- ### Retrieving Service Mesh Cluster Status via API Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/install2.3/awx_viewing_mesh.html This is an example of the JSON response received when making a GET request to the /api/v2/mesh_visualizer/ endpoint. It details the nodes and their states, as well as the links between them. ```json HTTP 200 OK Allow: GET, HEAD, OPTIONS Content-Type: application/json Vary: Accept X-API-Node: 192.0.121.28 X-API-Product-Name: AWX X-API-Product-Version: 24.6.1 X-API-Time: 0.019s { "nodes": [ { "id": 1, "hostname": "192.0.121.28", "node_type": "control", "node_state": "healthy" }, { "id": 2, "hostname": "192.0.127.70", "node_type": "execution", "node_state": "healthy" }, { "id": 3, "hostname": "192.0.126.172", "node_type": "hop", "node_state": "healthy" } ], "links": [ { "source": "192.0.127.70", "target": "192.0.121.28" }, { "source": "192.0.126.172", "target": "192.0.121.28" }, { "source": "192.0.127.70", "target": "192.0.126.172" } ] } ``` -------------------------------- ### Initiate Job with Callback Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/op-api-v2-job_templates-id-callback-get.html Configure a host to POST to this resource, passing the `host_config_key` parameter, to start a new job limited to only the requesting host. You can also pass `extra_vars` to the callback. ```APIDOC ## POST /api/v2/job_templates/{id}/callback/ ### Description Allows an ephemeral host to launch a new job for a specific job template by providing a `host_config_key`. Optionally, `extra_vars` can be included to pass additional variables to the job. ### Method POST ### Endpoint /api/v2/job_templates/{id}/callback/ ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the job template. #### Request Body - **host_config_key** (string) - Required - The host configuration key associated with the job template. - **extra_vars** (object) - Optional - Additional variables to pass to the job. ### Request Example ```json { "host_config_key": "HOST_CONFIG_KEY", "extra_vars": { "key": "value" } } ``` ### Response #### Success Response (202) Indicates the request is valid and the job has been initiated. #### Error Responses - **403** - Invalid host config key. - **400** - Host cannot be determined from the address making the request. ### Notes - If the associated inventory has the `update_on_launch` flag set and `update_cache_timeout` has expired, an inventory sync will be performed. - A GET request can be used to verify host matching. ``` -------------------------------- ### awx CLI Help for Specific Action Options Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/cli_intro.html Further refine help by adding a specific action to the resource command followed by --help. This example displays options for the 'list' action of the 'users' resource. ```bash awx --conf.host https://192.102.118.107 --conf.token h7a3NPiam8Or4px7Kkoe87cWcTeixz users list --help ``` -------------------------------- ### Job Template Callback Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/olam-api-cli2.3/swagger.json Configures a host to POST to this resource to start a new job limited to only the requesting host. It supports passing host configuration keys and extra variables. The endpoint also allows for verifying host selection via a GET request. ```APIDOC ## GET /api/v2/job_templates/{id}/callback/ ### Description Verifies the host that will be selected for a callback request. This request must authenticate as a valid user with permission to edit the job template. ### Method GET ### Endpoint /api/v2/job_templates/{id}/callback/ ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the job template. #### Query Parameters - **host_config_key** (string) - Required - The host configuration key to use for the callback. ### Response #### Success Response (200) - **host_config_key** (string) - The host configuration key. - **matching_hosts** (array) - A list of hostnames that match the request. ## POST /api/v2/job_templates/{id}/callback/ ### Description Starts a new job limited to only the requesting host. This endpoint is intended to be called by a host. ### Method POST ### Endpoint /api/v2/job_templates/{id}/callback/ ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the job template. #### Request Body - **host_config_key** (string) - Required - The host configuration key. - **extra_vars** (object) - Optional - Additional variables to pass to the job. ``` -------------------------------- ### Install PostgreSQL Server and Contrib Packages Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/install-private-hub2.3/awx-InstallingOracleLinuxAutomationManager.html Installs the PostgreSQL server and additional contributed modules required for the database. ```bash sudo dnf install postgresql-server postgresql-contrib ``` -------------------------------- ### Install Private Automation Hub with Parameter File Source: https://docs.oracle.com/en/operating-systems/oracle-linux-automation-manager/2/install-private-hub2.3/awx-InstallingOracleLinuxAutomationManager.html Installs Private Automation Hub using a parameter file for configuration, in addition to admin and database passwords. ```bash -e "@single-node-vars.yml" ```