In Flashduty On-call
- In the Flashduty console, go to Integration Center → Change Events
- Select AWX / Ansible Automation Platform and enter an integration name
- To assign changes to specific channels, add rules under the integration’s Routes that match labels such as
projectorinventory - Click Save and copy the generated Push URL
Configure AWX
1
Create a webhook notification template
Go to Administration → Notifications (in AAP 2.5 and later, Automation Execution → Administration → Notifiers) and click Add:
- Type: select
Webhook - Target URL: the full Push URL of the Flashduty integration
- HTTP Method: select
POST - Leave Customize messages at its defaults. The default message body is
{{ job_metadata }}, the JSON description of the run, which is the format Flashduty parses
2
Enable the notification on the job template
Open the job template or workflow job template to sync, switch to the Notifications tab, and turn on Start, Success, and Failure for the notification template you just created. All three are needed: Start makes the change appear when the run begins, Success and Failure give the end state, and without them the change stays in Processing.You can also enable the notification on an Organization, which sends it for every template in the organization; Flashduty ignores the project sync, inventory sync, and management job notifications that result.
3
Run the job
Save, then launch the job template; the change appears in the Flashduty change list. The Test button on the notification template sends a test message: Flashduty answers successfully but records no change, so it confirms the Push URL is reachable. AWX shows the result of each delivery in the notification template’s sent notifications.
What one change is
Each run of a job template or workflow job is one change. The change key (change_key) is AWX’s job ID (
id), for example 4711.
- The start and end notifications of one run update the same change
- Two runs of the same template are two changes; a relaunch is a new run
- Jobs and workflow jobs share one ID sequence, and each job template run launched by a workflow is its own change
- Job IDs are unique within one AWX instance. Create a separate integration per instance, otherwise the same job ID on two instances is merged into one change
Status mapping
Done, Failed, and Canceled are end states; Flashduty records the change’s end time.
With a custom message body,
new maps to Planned, and pending and waiting map to Ready; the default body never sends these three.
Change content
Labels can be used for routing and for filtering the change list:
Extra variables (
extra_vars), credentials, and per-host results may contain sensitive data and are not recorded.
FAQ
Why don't I see any changes?
Why don't I see any changes?
- Check that Start, Success, and Failure are all on in the job template’s Notifications tab
- Check that Customize messages did not change the message body; when the body is not JSON, AWX sends an empty object
{}and Flashduty rejects it - Open the notification template’s sent notifications under Administration → Notifications to see whether each delivery succeeded and which error came back
Why is the change stuck in Processing?
Why is the change stuck in Processing?
The end notification did not arrive. Check that the template has Success and Failure notifications on and that AWX can reach Flashduty. AWX does not resend a failed delivery.
Why don't project syncs show up as changes?
Why don't project syncs show up as changes?
Project syncs, inventory syncs, and management jobs (such as cleanup jobs) do not change production, so Flashduty answers successfully and records nothing. The same goes for workflow approval node notifications.
Which deliveries does Flashduty reject?
Which deliveries does Flashduty reject?
Flashduty rejects a delivery when:
unsupported status: thestatusin the body is missing or not an AWX job status; this also appears when the body is not JSON, because AWX then sends{}id is missing: a custom message body has no job ID; keep theidfield in the body
Why does the change link point to https://towerhost?
Why does the change link point to https://towerhost?
The link is built from AWX’s Base URL of the service setting, whose default is
https://towerhost. Set it to the address AWX is actually served on (for example https://awx.example.com) under Settings → System; only runs started afterwards carry a working link, and links of changes already recorded are not updated.