Skip to content

Instantly share code, notes, and snippets.

@Ginja
Ginja / smartproxy-vault-helpers.rb
Created May 12, 2016 17:36
Chef helper methods for requesting a token from a Smart Proxy instance
# For use with https://github.com/theforeman/smart_proxy_vault
module Vault
module Helpers
def client_key_path
Chef::Config[:client_key]
end
def node_name
Chef::Config[:node_name]
end
@Ginja
Ginja / rpm-from-source.sh
Created February 16, 2016 05:00 — forked from fernandoaleman/rpm-from-source.sh
How to create an RPM from source with spec file
# How to create an RPM from source with spec file
# This is for Redhat versions of linux. Sometimes when you search for an rpm package,
# it is either outdated or not available. The only thing available is the source code.
# You can create a custom RPM package from source.
#
# For this example, I'll be using the latest version of Git, currently v.1.7.7.3
# Step: 1
# Install rpmbuild
@Ginja
Ginja / dynflow-executor
Last active October 22, 2015 18:12
A service script to run dynflow-executor inside an RVM installation
# Author: Riley Shott
# https://gist.github.com/Ginja/fb123759d48b04b5f338
# dynflow-executor - starts or stops the Dynflow executor for Foreman tasks
#
# chkconfig: 345 99 20
# description: dynflow-executor is a rake task that comes with \
# the foreman-tasks gem
# processname: dynflow-executor
# pidfile: /usr/local/foreman/tmp/pids/dynflow_executor_monitor.pid
# pidfile: /usr/local/foreman/tmp/pids/dynflow_executor.pid
@Ginja
Ginja / install-cfn.sh
Last active August 29, 2015 14:23
Installs the latest CFN tools including the init.d script
#!/bin/bash
# Author: Riley Shott
# Description: Installs the latest CFN tools including the init.d script
if [[ -e "/etc/redhat-release" ]]; then
PKG_MGR="yum"
PLATFORM="redhat"
elif [[ -e "/etc/debian_version" ]]; then
PKG_MGR="apt-get"