Created
August 21, 2020 23:20
-
-
Save dmsimard/1b1a9201a8342461d1d5bb8e62d0f5ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Test playbook | |
hosts: localhost | |
tasks: | |
- name: Retrieve the current playbook so we can get the ID | |
ara_playbook: | |
register: playbook_query | |
- name: Recover base url from ara | |
set_fact: | |
base_url: "{{ lookup('ara_api', '/api/') }}" | |
- name: Craft link to playbook report | |
vars: | |
real_base_url: "{{ base_url.api[0] | regex_replace('/api/v1/', '') }}" | |
debug: | |
msg: "{{ real_base_url }}/playbooks/{{ playbook_query.playbook.id | string }}.html" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment