Skip to content

Instantly share code, notes, and snippets.

@Duologic
Created January 22, 2018 16:07
Show Gist options
  • Save Duologic/8838730b1e0177c606d6efe51e12eca8 to your computer and use it in GitHub Desktop.
Save Duologic/8838730b1e0177c606d6efe51e12eca8 to your computer and use it in GitHub Desktop.
Import Rundeck jobs
#!/bin/bash
# ./import_jobs.sh <token> <project> <file>
set -euo pipefail
IFS=$'\n\t'
curl -s -X POST --data-binary @$3 \
-H"X-Rundeck-Auth-Token: $1" \
-H"Content-Type: application/xml" \
"http://rundeck.example:4440/api/19/project/$2/jobs/import?uuidOption=remove"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment