Skip to content

Instantly share code, notes, and snippets.

@gschueler
gschueler / BUILD-GPG-KEY-Rundeck.org.key
Last active November 16, 2023 20:55
BUILD-GPG-KEY-Rundeck.org.key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFVwoygBEADPrzQqfGJqe0mcyLV86A9qHqZpmAcE7hrnPBHIjrqFL0y5mSWj
sZSnAY49zqBHs1t7SiNGfFE1F8tY+pYLfcJ4/lUxkK+Ti4kNEvSViEtGamiW5T8d
oe/XUz5PwLKrjnqt3F5CVHk+sfNoQY8PxIpfkR/QXBrCOOE7T0+dYzjECP/na26e
TC7fAnjSLbp0tSyU5aNpmk5plXL/tyC7SP/L/bCNihSKmwP3la8kt0JmY4p+OqqA
FM3xbn8vAkpZepa5H1pN7C/uDN2Th7v8nMfYIj9/Frl1WTJ5hhQSE1E93DX9ooJ5
aS3w4U3vbN+YPGsy/kIPnVfSobW40boK/Ad4Tnc/CEjzw3uueLnLg4BgpcMHHGzb
tgOK7MVDt4YcBs0z2Bi2Wd5ai8JGi00V5rIbtctH9cmiNDu/naDfxNduVC/QsPpu
AeaMZ6XXF//1uPF8R5Q0ROrKGzNmcuLO0jyj9tZiwmjEIuadKBviiva6swcReSis
@gschueler
gschueler / LogstashPlugin.groovy
Last active October 25, 2023 22:01
Rundeck streaming log writer and Logstash input
import com.dtolabs.rundeck.plugins.logging.StreamingLogWriterPlugin;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.dtolabs.rundeck.core.logging.LogEvent;
import com.dtolabs.rundeck.core.logging.LogLevel;
/**
* Opens a TCP connection, and writes JSON event messages to the socket
*/
rundeckPlugin(StreamingLogWriterPlugin){
configuration{
@gschueler
gschueler / keygen.groovy
Created July 13, 2023 17:51
generate random key
import java.security.*;
def len=256
if(args.length>0){
len = Integer.parseInt(args[0])
}
byte[] sharedKey = new byte[len]
new SecureRandom().nextBytes(sharedKey)
@gschueler
gschueler / bc-providers.groovy
Created September 6, 2022 21:47
List PBE providers for Jasypt with BouncyCastle and groovy
@Grab('org.jasypt:jasypt:1.9.3')
import org.jasypt.registry.AlgorithmRegistry
@Grab('org.bouncycastle:bcprov-jdk15on:1.70')
import org.bouncycastle.jce.provider.BouncyCastleProvider
import java.security.Security
Security.addProvider(new BouncyCastleProvider());
Set digestAlgos = AlgorithmRegistry.getAllDigestAlgorithms();
Set pbeAlgos = AlgorithmRegistry.getAllPBEAlgorithms();
@gschueler
gschueler / success-template.html
Created May 2, 2014 20:21
Example email templates for rundeck notifications
<div>Execution ${execution.id} was <b>${execution.status}</b></div>
<ul>
<li><a href="${execution.href}">Execution result</a></li>
<li><a href="${job.href}">Job</a></li>
<li><a href="${execution.projectHref}">Project: ${execution.project}</a></li>
<li><a href="${rundeck.href}">Rundeck</a></li>
</ul>
<p>
</p>
@gschueler
gschueler / Curl job run.md
Created January 18, 2011 04:07
How to run a rundeck job using curl

Run a Job using Curl

This document describes how to use CURL to interact with the RunDeck server to invoke a Job to run.

The steps are as follows:

  1. Authenticate to the RunDeck server and acquire a session cookie.
  2. Submit run request for particular Job ID, sending session cookie.
@gschueler
gschueler / rundeck-config.groovy
Created June 4, 2013 16:18
Example rundeck-config for SMTP mail configuration
loglevel.default = "DEBUG"
rdeck.base = "/var/lib/rundeck"
rss.enabled = true
dataSource {
dbCreate = "update"
url = "jdbc:h2:file:/var/lib/rundeck/data/rundeckdb;MVCC=true"
}
@gschueler
gschueler / basic-app.json
Last active November 5, 2020 18:46
Basic Rundeck aclpolicy, allows access to one project for one group
{
"description": "MyGroup allowed access to MyProject only",
"context": {
"application": "rundeck"
},
"for": {
"project": [
{
"match": {
"name": "MyProject"
@gschueler
gschueler / rundecknotify.sh
Created December 5, 2012 21:37
Example CGI script for receiving Rundeck Webhook calls
#!/bin/bash -e
#set to correct path to xmlstarlet
XMLSTARLET=/usr/local/bin/xml
# xmlstarlet select xpath
# usage: xmlsel XPATH file
xmlsel(){
xpath=$1
shift
$XMLSTARLET sel -T -t -v "$xpath" $*

enable debug logging for rundeck grails controller in rundeck 3

Create a file logback.groovy as above.

Launch rundeck with the following jvm system property: logging.config=<path to logback.groovy>

for example:

java -Xmx4g -Dlogging.config=pwd/server/config/logback.groovy -jar rundeck-3.0.20-20190408.war