Issues while passing arguments in Semaphore Task API #516
ApoorvaBhargav
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Team, I have a requirement to call Semaphore task API to run with arguments with dynamic value, similar to passing extravars in ansible but somehow the json always breaks when passing arguments, my version is 2.15 and here's a sample json with arguments. Also note that API works fine without arguments.
curl -v -X POST http://hostname.ip.tdk.dk:30080/api/project/4/tasks -H "Content-Type: application/json" -H "Authorization: Bearer xxxxmy tokenhere" -d '{
"template_id": 17,
"limit": "somehost.ip.tdk.dk",
"arguments": ["--extra-vars", "{\"HostName\":\"somehost.ip.tdk.dk\"}"],
"debug": false,
"dry_run": false,
"reason": "Triggering os validation from API" }'
Beta Was this translation helpful? Give feedback.
All reactions