Skip to content

Commit 66c3fb9

Browse files
committed
Update entrypoint.sh
1 parent 34b9083 commit 66c3fb9

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

entrypoint.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,28 @@ tee playbook.yml << EOF
4848
controller_username: "$CONTROLLER_USERNAME"
4949
controller_password: "$CONTROLLER_PASSWORD"
5050
controller_host: "$CONTROLLER_HOST"
51+
52+
- name: Wait for job
53+
awx.awx.job_wait:
54+
job_id: "{{ job_output.id }}"
55+
timeout: 1800
56+
validate_certs: "$CONTROLLER_VERIFY_SSL"
57+
controller_username: "$CONTROLLER_USERNAME"
58+
controller_password: "$CONTROLLER_PASSWORD"
59+
controller_host: "$CONTROLLER_HOST"
60+
61+
- name: retrieve job info
62+
uri:
63+
url: https://"$CONTROLLER_HOST"/api/v2/jobs/{{ job_output.id }}/stdout/?format=json
64+
method: GET
65+
user: "$CONTROLLER_USERNAME"
66+
password: "$CONTROLLER_PASSWORD"
67+
validate_certs: "$CONTROLLER_VERIFY_SSL"
68+
force_basic_auth: yes
69+
register: playbook_output
70+
71+
- debug:
72+
var: playbook_output.json.content
5173
EOF
5274

5375
echo "AAP Github Action - Executing Automation Job on Automation controller"

0 commit comments

Comments
 (0)