View output for your playbook job runs

You can run playbook jobs to run Ansible playbooks on one or more managed nodes directly from the automation controller interface without creating a job template.

Use playbook run jobs to perform tasks that are more complex than those that can be accomplished with remote command execution. Any task that you can describe as an Ansible Playbook can be run on a host or group of hosts in your inventory. You can manage your systems quickly and easily. Because of an RBAC engine and detailed audit logging, you know which user has completed a specific task.

When a playbook is run, the results display in the Output tab. If used, the Ansible CLI displays the same information. This can be useful for debugging.

The events summary displays the following events that are run as part of this playbook:

  • The number of times this playbook has run is shown in the Plays field
  • The number of tasks associated with this playbook is shown in the Tasks field
  • The number of hosts associated with this playbook is shown in the Hosts field
  • The amount of time it took to complete the playbook run is shown in the Elapsed field

Job events summary

You can Relaunch job, Cancel job, download Download the job output, or delete Delete the job.

Hover over a section of the host status bar in the Output view and the number of hosts associated with that status displays.

The output for a playbook job is also available after launching a job from the Jobs tab of its Jobs Templates page. View its host details by clicking the line item tasks in the output.

Playbook run details

Learn how to view the details of a playbook run in Automation controller.

Access the Details tab to view details about the job execution:


Job details for example run

You can view the following details for an executed job:

  • Status: It can be any of the following:
    • Pending: The playbook run has been created, but not queued or started yet. Any job, not just playbook runs, stay in pending until it is ready to be run by the system. Reasons for playbook runs not being ready include dependencies that are currently running (all dependencies must be completed before the next step can run), or there is not enough capacity to run in the locations it is configured to.
    • Waiting: The playbook run is in the queue waiting to be executed.
    • Running: The playbook run is currently in progress.
    • Successful: The last playbook run succeeded.
    • Failed: The last playbook run failed.
  • Job template: The name of the job template from which this job launched.
  • Inventory: The inventory selected to run this job against.
  • Project: The name of the project associated with the launched job.
  • Project Status: The status of the project associated with the launched job.
  • Playbook: The playbook used to launch this job.
  • Execution environment: The name of the execution environment used in this job.
  • Credentials: The credentials used in this job.
  • Extra variables: Any extra variables passed when creating the job template are displayed here.

Select one of these items to view the corresponding job templates, projects, and other objects.

Playbook access and information sharing

Automation controller’s use of automation execution environments and Linux containers prevents playbooks from reading files outside of their project directory.

By default, the only data exposed to the ansible-playbook process inside the container is the current project being used.

You can customize this in the Job Settings and expose additional directories from the host into the container.

Isolation functionality and variables

Automation controller uses container technology to isolate jobs from each other. By default, only the current project is exposed to the container running a job template.

If you need to expose additional directories, you must customize your playbook runs. To configure job isolation, you can set variables.

By default, automation controller uses the system’s tmp directory (/tmp by default) as its staging area. You can change this in the Job Execution Path field of the Jobs settings page, or in the REST API at /api/v2/settings/jobs:

AWX_ISOLATION_BASE_PATH = "/opt/tmp"

If there are any additional directories that should specifically be exposed from the host to the container that playbooks run in, you can specify those in the Paths to expose to isolated jobs field of the Jobs Settings page, or in the REST API at /api/v2/settings/jobs:

AWX_ISOLATION_SHOW_PATHS = ['/list/of/', '/paths']
Note
  • If a path to a specific file is entered, then the entire directory containing that file will be mounted inside the execution environment.
  • If your playbooks need to use keys or settings defined in AWX_ISOLATION_SHOW_PATHS, then add this file to /var/lib/awx/.ssh.

The fields described here can be found on the Jobs settings page:


Jobs settings options