Access Ansible Automation Platform through the CLI

You can use the OpenShift Container Platform CLI to fetch the web address and the password of the Automation controller that you created. To login to the platform gateway, you need the web address and the password.

Fetch the platform gateway web address

A Red Hat OpenShift Container Platform route exposes a service at a host name, so that external clients can reach it by name. When you created the platform gateway instance, a route was created for it. The route inherits the name that you assigned to the platform gateway object in the YAML file.

About this task

Procedure

Use the following command to fetch the routes:
oc get routes -n <platform_namespace>

Results

You can see in the following example, the example platform gateway is running in the ansible-automation-platform namespace.

$ oc get routes -n ansible-automation-platform

NAME      HOST/PORT                                              PATH   SERVICES          PORT   TERMINATION     WILDCARD
example   example-ansible-automation-platform.apps-crc.testing          example-service   http   edge/Redirect   None

The address for the platform gateway instance is example-ansible-automation-platform.apps-crc.testing.

Fetch the platform gateway password

The YAML block for the platform gateway instance in the AnsibleAutomationPlatform object assigns values to the name and admin_user keys.

About this task

Procedure

  1. Use these values in the following command to fetch the password for the platform gateway instance.
    oc get secret/<your instance name>-<admin_user>-password -o yaml
  2. The default value for admin_user is admin. Modify the command if you changed the admin username in the AnsibleAutomationPlatform object.

    The following example retrieves the password for a platform gateway object called example:

    oc get secret/example-admin-password -o yaml

    The base64 encoded password for the platform gateway instance is listed in the metadata field in the output:

    $ oc get secret/example-admin-password -o yaml
    
    apiVersion: v1
    data:
      password: ODzLODzLODzLODzLODzLODzLODzLODzLODzLODzLODzL
    kind: Secret
    metadata:
      labels:
        app.kubernetes.io/component: aap
        app.kubernetes.io/name: example
        app.kubernetes.io/operator-version: ""
        app.kubernetes.io/part-of: example
      name: example-admin-password
      namespace: ansible-automation-platform