Compare commits
No commits in common. "a0d452758d314a27af30ab296979120f12d2b2fe" and "822c2a68aa6bc63f857d293541268babfe6e2d29" have entirely different histories.
a0d452758d
...
822c2a68aa
2 changed files with 20 additions and 2 deletions
|
@ -94,8 +94,8 @@ jobs:
|
|||
-d "{\"extra_vars\": {\"target_host\": \"$TARGET_HOST\", \"folder\": \"$FOLDER\"}}" \
|
||||
"https://awx.mafyuh.xyz/api/v2/job_templates/13/launch/"
|
||||
|
||||
- name: Delay for 45 seconds
|
||||
run: sleep 45
|
||||
- name: Delay for 2 minutes
|
||||
run: sleep 120 # 120 seconds = 2 minutes
|
||||
|
||||
- name: Fetch AWX Job Logs
|
||||
run: |
|
||||
|
|
18
.forgejo/workflows/get-logs.yml
Normal file
18
.forgejo/workflows/get-logs.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
---
|
||||
name: Get AWX Job Logs
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
name: get-logs-trigger
|
||||
|
||||
jobs:
|
||||
fetch-logs:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Get AWX Job Logs
|
||||
run: |
|
||||
# Fetch the most recent job from AWX
|
||||
job_id=$(curl -s -H "Authorization: Bearer ${{ secrets.AWX_API_TOKEN }}" https://awx.mafyuh.xyz/api/v2/job_templates/13/jobs?order_by=-id | jq -r '.results[0].id')
|
||||
|
||||
# Fetch the logs for the job
|
||||
curl -s -H "Authorization: Bearer ${{ secrets.AWX_API_TOKEN }}" https://awx.mafyuh.xyz/api/v2/jobs/$job_id/stdout/
|
Reference in a new issue