Skip to content

Instantly share code, notes, and snippets.

@dmsimard
Created January 16, 2019 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmsimard/318682878b90041b4b0e47a11c67aa00 to your computer and use it in GitHub Desktop.
Save dmsimard/318682878b90041b4b0e47a11c67aa00 to your computer and use it in GitHub Desktop.
- name: Get playbooks
ara_api:
# This doesn't actually need to be specified, the module can pick it up from the callback config
# https://github.com/openstack/ara-plugins/blob/49ce188ab88a6948db651163b9cd7973117fa2b1/ara/plugins/action/ara_record.py#L143-L153
# api_server: https://api.demo.recordsansible.org
action: get
endpoint: /api/v1/playbooks
filter:
status: failed
register: failed_playbooks
- name: Do something if there are failed playbooks
command: something
when: failed_playbooks.results | length >= 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment