Chapter 6. Jobs


Resolve common job issues including module resolution errors, timeout errors, pending jobs, and permission errors.

Jobs are failing with the error message “ERROR! couldn’t resolve module/action 'module name'. This often indicates a misspelling, missing collection, or incorrect module path”.

This error can happen when the collection associated with the module is missing from the execution environment.

The recommended resolution is to create a custom execution environment and add the required collections inside of that execution environment. For more information about creating an execution environment, see Using Ansible Builder in Creating and using execution environments.

Alternatively, you can complete these steps:

Procedure

  1. Create a collections folder inside of the project repository.
  2. Add a requirements.yml file inside of the collections folder and add the collection:

    collections:
    - <collection_name>

This error can happen when the timeout value is too small, causing the job to stop before completion. The default timeout value for connection plugins is 10.

To resolve the issue, increase the timeout value by completing one of the following methods.

Note

The following changes will affect all of the jobs in automation controller. To use a timeout value for a specific project, add an ansible.cfg file in the root of the project directory and add the timeout parameter value to that ansible.cfg file.

Procedure

  • Increase the timeout value by using one of the following methods:

    • Add ANSIBLE_TIMEOUT as an environment variable in the automation controller UI:

      1. Go to automation controller.
      2. From the navigation panel, select Settings Jobs settings.
      3. Under Extra Environment Variables add the following:

        {
        "ANSIBLE_TIMEOUT": 60
        }
    • Add a timeout value in the [defaults] section of the ansible.cfg file:

      1. Edit the /etc/ansible/ansible.cfg file and add the following:

        [defaults]
        timeout = 60
    • Run ad hoc commands with a timeout:

      1. To run an ad hoc playbook in the command line, add the --timeout flag to the ansible-playbook command, for example:

        # ansible-playbook --timeout=60 <your_playbook.yml>

After launching jobs in automation controller, the jobs stay in a pending state and do not start.

There are a few reasons jobs can become stuck in a pending state. For more information about troubleshooting this issue, see Playbook stays in pending in Configuring automation execution

Procedure

  1. Run the following commands to list all of the pending jobs:

    # awx-manage shell_plus
    >>> UnifiedJob.objects.filter(status='pending')
  2. Cancel the pending jobs by using one of the following methods:

    • To cancel all pending jobs, run the following command:

      >>> UnifiedJob.objects.filter(status='pending').update(status='canceled')
    • To cancel a single job, run the following command, replacing <job_id> with the job ID to cancel:

      >>> UnifiedJob.objects.filter(id=<job_id>).update(status='canceled')

Jobs are failing with the error message "denied: requested access to the resource is denied, unauthorized: Insufficient permissions". This happens when using an execution environment in private automation hub.

This issue occurs when you protect private automation hub with a password or token but do not assign the registry credential to the execution environment.

Procedure

  1. Go to automation controller.
  2. From the navigation panel, select Administration Execution Environments.
  3. Click the execution environment assigned to the job template that is failing.
  4. Click Edit.
  5. Assign the appropriate Registry credential from your private automation hub to the execution environment.
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top