feat(playbook): Add Trace output for inventory upload
ref: #44 closes #34
This commit is contained in:
@ -102,6 +102,10 @@
|
||||
dest: "/tmp/{{ ansible_hostname }}.json"
|
||||
|
||||
|
||||
- name: Try / catch
|
||||
block:
|
||||
|
||||
|
||||
- name: Upload inventory - {{ ansible_hostname }}
|
||||
ansible.builtin.uri:
|
||||
url: |-
|
||||
@ -120,6 +124,20 @@
|
||||
- 201
|
||||
no_log: > # Contains a secret that logging shows
|
||||
{{ nfc_pb_disable_log | default(true) }}
|
||||
register: api_post_inventory
|
||||
|
||||
|
||||
always:
|
||||
|
||||
|
||||
- name: Trace - Show Upload Details
|
||||
ansible.builtin.debug:
|
||||
- |
|
||||
Upload failed with:
|
||||
* URL: {{ api_post_inventory.url }}
|
||||
* HTTP status code: {{ api_post_inventory.status }}
|
||||
* Message: {{ api_post_inventory.msg }}
|
||||
* Body: {{ api_post_inventory.json }}
|
||||
|
||||
|
||||
always:
|
||||
@ -128,6 +146,7 @@
|
||||
path: "/tmp/{{ ansible_hostname }}.json"
|
||||
state: absent
|
||||
|
||||
|
||||
vars:
|
||||
|
||||
nfc_pb_awx_tower_template:
|
||||
|
Reference in New Issue
Block a user