Este contenido no está disponible en el idioma seleccionado.

Chapter 6. Jobs


Troubleshoot issues with jobs.

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 the following 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>
    Copy to Clipboard Toggle word wrap

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.

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
    }
    Copy to Clipboard Toggle word wrap

Add a timeout value in the [defaults] section of the ansible.cfg file by using the CLI

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

    [defaults]
    timeout = 60
    Copy to Clipboard Toggle word wrap

Running ad hoc commands with a timeout

  • 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>
    Copy to Clipboard Toggle word wrap

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

Cancel all pending jobs

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

    # awx-manage shell_plus
    Copy to Clipboard Toggle word wrap
    >>> UnifiedJob.objects.filter(status='pending')
    Copy to Clipboard Toggle word wrap
  2. Run the following command to cancel all of the pending jobs:

    >>> UnifiedJob.objects.filter(status='pending').update(status='canceled')
    Copy to Clipboard Toggle word wrap

Cancel a single job by using a job id

  • To cancel a specific job, run the following commands, replacing <job_id> with the job id to cancel:

    # awx-manage shell_plus
    Copy to Clipboard Toggle word wrap
    >>> UnifiedJob.objects.filter(id=_<job_id>_).update(status='canceled')
    Copy to Clipboard Toggle word wrap

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

This issue happens when your private automation hub is protected with a password or token and the registry credential is not assigned 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.
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat