Reputation: 11
I want to change the Timeout values of a Rundeck job i have created, is there a way to change the timeout value through API call or CLI, if so please suggest how to do that?
Upvotes: 0
Views: 323
Reputation: 4325
It's possible, but re-uploading the whole job. So, you can edit the XML/YAML file and then reupload.
RDCLI:
rd jobs load -f HelloWorld.xml -p ProjectEXAMPLE
API (wrapped with a bash script):
#!/bin/sh
# protocol
protocol="http"
# basic rundeck info
rdeck_host="localhost"
rdeck_port="4440"
rdeck_api="40"
rdeck_token="0jEkMXbPBUzx984HeM3RUDQSXg4yJzyT"
# specific api call info
rdeck_project="ProjectEXAMPLE"
rdeck_xml_file="HelloWorld.xml"
# api call
curl -kSsv --header "X-Rundeck-Auth-Token:$rdeck_token" \
-F xmlBatch=@"$rdeck_xml_file" "$protocol://$rdeck_host:$rdeck_port/api/$rdeck_api/project/$rdeck_project/jobs/import?fileformat=xml&dupeOption=update"
Upvotes: 1