Install
https://rundeck.github.io/rundeck-cli/
https://github.com/rundeck/rundeck-cli/releases
sudo apt-get install -y default-jre-headless
wget -q https://github.com/rundeck/rundeck-cli/releases/download/v2.0.0/rundeck-cli_2.0.0-1_all.deb
sudo dpkg -i rundeck-cli_*_all.deb
# sudo apt-get install rundeck-cli
Configuration
https://rundeck.github.io/rundeck-cli/configuration/
# ~/.rd/rundeck-dev.conf
export RD_URL=http://rundeck.dev.example.com:80
export RD_USER=admin
export RD_PASSWORD=admin
# load configuration
source ~/.rd/rundeck-dev.conf
Commands
https://rundeck.github.io/rundeck-cli/commands/
rd projects create -p ops
rd projects configure set -p ops --file ~/project.properties
rd keys create --type privateKey --path keys/lib/rundeck/.ssh/github_rsa --file ~/github_rsa
rd projects scm setup -p ops --integration import --type git-import --file ~/scm-import.json
rd projects scm perform -p ops -i import --action initialize-tracking -f useFilePattern="true" filePattern=".*\\.yaml"
rd projects scm perform -i import -p ops --action import-all
rd projects scm perform -i import -p ops --action import-all --item "ops/my-job-file.yaml"
Create / configure Project properties
https://docs.rundeck.com/docs/administration/configuration/config-file-reference.html#project-properties
rd projects create -p project1
rd projects configure get -p project1
# import porject settings from configuration file
rd projects configure set -p project1 --file ~/project.propertiesNodes