Skip to content

Instantly share code, notes, and snippets.

@tkuchiki
Created July 6, 2017 05:35
Show Gist options
  • Select an option

  • Save tkuchiki/20f3dbe1c693a3b8943058a430b63679 to your computer and use it in GitHub Desktop.

Select an option

Save tkuchiki/20f3dbe1c693a3b8943058a430b63679 to your computer and use it in GitHub Desktop.
rundeck api
#!/bin/bash
TOKEN="${1}"
PROJECT="${2}"
curl -s -X POST \
-H "X-Rundeck-Auth-Token: ${TOKEN}" \
-F "xmlBatch=@/tmp/job.yaml" \
"http://localhost:4440/api/19/project/${PROJECT}/jobs/import?fileformat=yaml"
-
description: ''
executionEnabled: true
loglevel: INFO
name: testjob
nodeFilterEditable: false
nodefilters:
dispatch:
excludePrecedence: true
keepgoing: false
rankOrder: ascending
threadcount: 1
filter: 'name: your-node-name'
nodesSelectedByDefault: true
scheduleEnabled: true
sequence:
commands:
- args: foobar
scriptfile: /tmp/test.sh
keepgoing: false
pluginConfig:
WorkflowStrategy:
node-first: null
strategy: node-first
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment