AWX logo

This project is not covered by Drupal’s security advisory policy.

The AWX / Ansible Tower Client module provides a lightweight Drupal service for launching automation jobs on an AWX / Ansible Tower / Red Hat Ansible Automation Platform instance via its REST API. It gives other modules a single, reusable API client for triggering job templates and surfacing the resulting job in AWX, without each module having to reinvent HTTP plumbing, authentication, logging, and configuration.

Use this module any time you want Drupal to drive infrastructure or operational automation: provisioning customer environments, kicking off backups, restarting services, deploying configuration, running ad-hoc playbooks from a workflow, etc. It is intentionally small; it is a client library wrapped in a configuration form, not a workflow engine.

After enabling the module, visit Administration → Configuration → Web services → AWX / Ansible Tower (/admin/config/services/awx) and configure:

The module does not expose any UI for launching jobs itself. To use it from your own custom module, inject the awx.awx_client service and call createJobFromTemplate($template_id, $extra_vars, $template_name). Check the return value against AwxClient::REQUEST_FAILURE_MODES to handle errors, and use getJobUrl($job_id) to link operators to the running job in AWX.

There are general-purpose HTTP client and webhook modules that could be wired up to AWX manually, but they require each consumer to handle authentication, endpoint construction, error semantics, and logging on their own. This module is purpose-built for AWX / Ansible Tower's /api/v2/job_templates/{id}/launch/ endpoint and exposes it as a typed Drupal service.

Supporting organizations: 
Architecture & development

Project information

Releases