Skip to content

Instantly share code, notes, and snippets.

View velocity303's full-sized avatar

James Jones velocity303

  • Chicago, IL, United States
View GitHub Profile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@velocity303
velocity303 / list.txt
Created September 26, 2017 15:07
AWS Gem List
aws-partitions (1.23.0)
aws-sdk (2.10.52)
aws-sdk-core (2.10.52)
aws-sdk-resources (2.10.52)
aws-sdk-v1 (1.67.0)
aws-sigv4 (1.0.2)
bigdecimal (1.2.4)
bundler (1.15.4)
colored (1.2)
cri (2.6.1)
@velocity303
velocity303 / mssql_backend.rb
Last active August 11, 2017 15:47
MS SQL Server Hiera Backend (WIP)
# Class Mssql_backend
# Description: MS SQL back end to Hiera.
class Hiera
module Backend
class Mssql_backend
def initialize
@use_jdbc = defined?(JRUBY_VERSION) ? true : false
if @use_jdbc
require 'jdbc/sqlserver'
require 'java'
define profile::apache::rproxy_vhost (
$port,
$host,
) {
include profile::apache
include apache::mod::proxy
include apache::mod::rewrite
Apache::Vhost {
docroot => '/var/www/reverse',
}
@velocity303
velocity303 / Jenkinsfile
Last active January 4, 2017 05:15
Jenkinsfile for Puppet Testing with Pipeline Plugin
node {
stage ('Checkout Control Repo') {
git url: 'https://github.com/velocity303/demo-control-repo.git', branch: 'production'
}
stage ('Check Style') {
sh 'echo $(find . -type f -name "*.pp" \\( -exec /opt/puppetlabs/puppet/bin/puppet-lint --with-filename {} \\; -o -quit \\) 2>&1 ) | grep -v ERROR'
}
stage ('Check Syntax') {
sh 'echo $(find . -type f -name "*.pp" \\( -exec /opt/puppetlabs/bin/puppet parser validate {} \\; -o -quit \\) 2>&1 ) | grep -v Error'
@velocity303
velocity303 / wordpress.pp
Created December 14, 2015 15:58
Wordpress Puppet Profile
class profile::example::wordpress {
include apache
include apache::mod::php
include mysql::server
include mysql::bindings
include mysql::bindings::php
apache::vhost { $::fqdn:
priority => '10',
vhost_name => $::fqdn,
@velocity303
velocity303 / jenkins.pp
Last active September 11, 2015 23:42
Jenkins profile --- so far...
class profile::app::jenkins (
$jenkins_version = 'latest',
$tomcat_major_version = '8',
) {
case $tomcat_major_version {
'6': {
$tomcat_version = '6.0.44'
$catalina_dir = "/opt/apache-tomcat6"
$tomcat_other_versions = [ '7', '8']
}
@velocity303
velocity303 / websphere.pp
Created August 31, 2015 15:29
Websphere sample profile
class profile::websphere {
class { 'ibm_installation_manager':
source_dir => '/vagrant/IBM/IM',
target => '/opt/IBM/InstallationManager',
}
class { '::websphere':
user => 'webadmin',
group => 'webadmins',
base_dir => '/opt/IBM',
}
@velocity303
velocity303 / win_setup.pp
Created June 16, 2015 20:46
Win Setup Profile
class profile::windows::win_setup {
include registry::service_example
include registry::compliance_example
file {'C:\windirstat1_1_2_setup.exe':
ensure => present,
source => 'puppet:///modules/profile/windirstat1_1_2_setup.exe',
}
package { 'WinDirStat 1.1.2':
ensure => present,
source => 'C:\windirstat1_1_2_setup.exe',
@velocity303
velocity303 / winpf.pp
Last active August 29, 2015 14:21
Windows code snippets for base OS Settings
#profile class for https://forge.puppetlabs.com/ptierno/windowspagefile
class profile::winpf {
case $os[release][major] {
"2008 R2": { if $::issql == 'true' {
$initialpf = 24576
$maximumpf = 24576
}
elsif $memorysize_mb < 16384 {
$initialpf = 1024
$maximumpf = 1024