Skip to content

Instantly share code, notes, and snippets.

@gschueler
gschueler / default.rb
Created September 27, 2011 18:25
rundeck recip
#
# Cookbook Name:: rundeck
# Recipe:: default
#
# Copyright 2011, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#
# install rundeck package
@gschueler
gschueler / example-project.properties
Created November 13, 2011 20:09
example ec2 plugin configuration for project.properties
#Project demo configuration, generated
#Wed Oct 05 19:17:03 PDT 2011
project.name=demo
project.resources.file=/Users/greg/rundeck14t/testec2/projects/demo/etc/resources.xml
project.ssh-keypath=/Users/greg/.ssh/id_rsa.aws1
resources.source.1.config.accessKey=asdfasdf
resources.source.1.config.refreshInterval=30
resources.source.1.config.runningOnly=true
resources.source.1.config.secretKey=asdfjadf
resources.source.1.config.useDefaultMapping=true
@gschueler
gschueler / env.bash
Created July 2, 2012 23:37
sample yana configuration
export CATALINA_OPTS="-Dyana2.config.location=$(pwd)/yana2-config.properties -XX:MaxPermSize=256m -Xmx1024m -Xms256m"
@gschueler
gschueler / BootStrap.groovy
Created August 16, 2012 01:53
Grails preauthenticated spring security resources definition
import org.codehaus.groovy.grails.plugins.springsecurity.SpringSecurityUtils
import org.codehaus.groovy.grails.plugins.springsecurity.SecurityFilterPosition
class BootStrap {
def init = { servletContext ->
// Add the bean 'j2eePreAuthenticatedProcessingFilter' into the filter chain
SpringSecurityUtils.clientRegisterFilter('j2eePreAuthenticatedProcessingFilter', SecurityFilterPosition.PRE_AUTH_FILTER)
}
@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" $*
@gschueler
gschueler / gist:5050535
Last active December 14, 2015 07:28
Grails error/exception reporting notes
package com.dtolabs.rundeck.core.authorization;
import com.dtolabs.rundeck.core.Constants;
import com.dtolabs.rundeck.core.authentication.Group;
import com.dtolabs.rundeck.core.authentication.Username;
import com.dtolabs.rundeck.core.authorization.providers.EnvironmentalContext;
import com.dtolabs.rundeck.core.authorization.providers.PoliciesParseException;
import com.dtolabs.rundeck.core.common.Framework;
import javax.security.auth.Subject;
import com.dtolabs.rundeck.plugins.notification.NotificationPlugin;
import groovy.text.SimpleTemplateEngine
//define the plugin
rundeckPlugin(NotificationPlugin){
//plugin title shown in GUI
title="Shell Notification"
//plugin description shown in GUI
description="Calls a shell script"
import com.dtolabs.rundeck.plugins.notification.NotificationPlugin;
rundeckPlugin(NotificationPlugin){
onstart {
println("success: data ${execution}")
true
}
onfailure {
println("failure: data ${execution}")
import com.dtolabs.rundeck.plugins.notification.NotificationPlugin;
import org.springframework.mail.javamail.*;
import javax.mail.internet.*;
import groovy.xml.MarkupBuilder
import groovy.text.SimpleTemplateEngine
//mail sender configuration
def mailProperties=[
host: "localhost",
port: 25,