Repository navigation
Expand file tree
/
Copy pathAWX Log Extractor.json
More file actions
190 lines (190 loc) · 4.35 KB
/
Copy pathAWX Log Extractor.json
File metadata and controls
190 lines (190 loc) · 4.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
{
"name": "AWX Log Extractor",
"nodes": [
{
"parameters": {
"method": "POST",
"url": "https://awx.znext.com/api/v2/job_templates/16/launch/",
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth",
"options": {
"allowUnauthorizedCerts": true
}
},
"id": "5c3ec273-b47a-4e37-a5c8-1c3d462f8589",
"name": "Launch AWX Job",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
-304,
80
],
"credentials": {
"httpBearerAuth": {
"id": "khIauZOFPf5ITqlA",
"name": "Bearer Auth account"
}
}
},
{
"parameters": {
"url": "=https://awx.znext.com/api/v2/jobs/{{ $items('Launch AWX Job')[0].json.job }}/",
"authentication": "genericCredentialType",
"genericAuthType": "httpBearerAuth",
"options": {
"allowUnauthorizedCerts": true
}
},
"id": "8019b48b-c3c2-4757-91d1-781c4d59e822",
"name": "Check Job Status",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
80,
80
],
"credentials": {
"httpBearerAuth": {
"id": "khIauZOFPf5ITqlA",
"name": "Bearer Auth account"
}
}
},
{
"parameters": {
"conditions": {
"string": [
{
"value1": "successful,failed,error,canceled",
"operation": "notContains",
"value2": "={{ $json.status }}"
}
]
}
},
"id": "6ec60862-6b28-45e3-b98b-c1c186664a51",
"name": "Is Job Still Running?",
"type": "n8n-nodes-base.if",
"typeVersion": 1,
"position": [
272,
80
]
},
{
"parameters": {
"amount": 10,
"unit": "seconds"
},
"id": "0bf25727-9754-410f-a6da-1410dfd9fa65",
"name": "Wait 10s",
"type": "n8n-nodes-base.wait",
"typeVersion": 1,
"position": [
-80,
80
],
"webhookId": "6891d927-220e-43e7-912f-fab88f35b868"
},
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-496,
80
],
"id": "e88069a9-8ca1-41d8-9467-ce8f343c368a",
"name": "When clicking ‘Execute workflow’"
},
{
"parameters": {
"jsCode": "// Get the log content string directly from the input data.\nconst logContent = items[0].json.artifacts.log_content;\n\n// Return a new object containing the extracted log.\n// We'll keep the output variable name 'fullLog' for consistency.\nreturn [{\n json: {\n fullLog: logContent\n }\n}];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
496,
96
],
"id": "af95bdb6-e07a-44c8-9eb4-ac3142632483",
"name": "Code"
}
],
"pinData": {},
"connections": {
"Launch AWX Job": {
"main": [
[
{
"node": "Wait 10s",
"type": "main",
"index": 0
}
]
]
},
"Check Job Status": {
"main": [
[
{
"node": "Is Job Still Running?",
"type": "main",
"index": 0
}
]
]
},
"Is Job Still Running?": {
"main": [
[
{
"node": "Wait 10s",
"type": "main",
"index": 0
}
],
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Wait 10s": {
"main": [
[
{
"node": "Check Job Status",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Launch AWX Job",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "2f0df3cd-b0a8-4ec5-ae40-77f27c4a00e8",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "090404b9ae0c2b496bbe0e0eb1d7655865af9c61f4544e516c9d3109dd9ac1ea"
},
"id": "xOnxV0fhrsOGNBsp",
"tags": []
}