Skip to content

Instantly share code, notes, and snippets.

@mrzarquon
mrzarquon / gist:5109553
Last active December 14, 2015 15:39
If william carlos williams were alive today and working for a startup.
"this is just to say
I have solved
the ticket
that I submitted
yesterday
and which
you were probably
trying
@mrzarquon
mrzarquon / Vagrantfile
Created May 21, 2013 18:30
My sample vagrant file for three hosts with our -nocm boxes May have to update it for Vagrant 1.1/1.2, http://docs.vagrantup.com/v2
Vagrant::Config.run do |config|
#config.vm.box = "base"
config.vm.define :master do |master_config|
master_config.vm.box = "ubuntu-12.04.2-server-amd64-vbox-428-nocm.box"
master_config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box"
master_config.vm.forward_port 443,8443
master_config.vm.forward_port 22,20022
master_config.vm.network :hostonly, "172.16.253.5"
master_config.vm.share_folder("modules", "/modules", "./modules")
end
@mrzarquon
mrzarquon / content of .repo file
Last active December 19, 2015 16:39
yum repo
[puppetlabs-products]
name=Puppet Labs Products El 6 - $basearch
baseurl=http://yum.puppetlabs.com/el/6/products/$basearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
enabled=1
gpgcheck=1
@mrzarquon
mrzarquon / top 10
Created July 12, 2013 21:09
Sorted_list
['rtyler/puppet', 9]
['wcooley/fail_unconfigured', 18]
['bobsh/puppetdb', 30]
['cloudsmith/demoapp', 51]
['gioppoluca/wso2am', 55]
['gioppoluca/wso2bam', 59]
['ngiger/elexis_cockpit', 60]
['gioppoluca/moodle', 60]
['reidmv/mcollective', 61]
['viirya/storm', 61]
@mrzarquon
mrzarquon / top 10
Created July 12, 2013 21:09
Sorted_list
['rtyler/puppet', 9]
['wcooley/fail_unconfigured', 18]
['bobsh/puppetdb', 30]
['cloudsmith/demoapp', 51]
['gioppoluca/wso2am', 55]
['gioppoluca/wso2bam', 59]
['ngiger/elexis_cockpit', 60]
['gioppoluca/moodle', 60]
['reidmv/mcollective', 61]
['viirya/storm', 61]
@mrzarquon
mrzarquon / gist:6020701
Created July 17, 2013 13:48
puppet is nice.
#!/bin/bash
agent_certname=$1
/opt/puppet/bin/puppet resource ini_setting certname \
path="/etc/puppetlabs/puppet/puppet.conf" \
section="main" \
setting="certname" \
value="${agent_certname}" \
ensure="present"
@mrzarquon
mrzarquon / gist:7330341
Created November 6, 2013 03:19
Simple Site.pp
## site.pp ##
## Active Configurations ##
# PRIMARY FILEBUCKET
# This configures puppet agent and puppet inspect to back up file contents when
# they run. The Puppet Enterprise console needs this to display file contents
# and differences.
# Define filebucket 'main':
@mrzarquon
mrzarquon / gist:0d2e198f26960c4ffb14
Created November 2, 2014 17:44
show_classification.sh "PE Master" - to see the full json rule / configuration for the "PE Master" classification group in the console
#!/bin/bash
# simple 3.7 NC classifier commands
declare -x PE_CERT=$(/opt/puppet/bin/puppet agent --configprint hostcert)
declare -x PE_KEY=$(/opt/puppet/bin/puppet agent --configprint hostprivkey)
declare -x PE_CA=$(/opt/puppet/bin/puppet agent --configprint localcacert)
declare -x NC_CURL_OPT="-s --cacert $PE_CA --cert $PE_CERT --key $PE_KEY --insecure"
@mrzarquon
mrzarquon / gist:be2860937d729c2c74de
Created December 16, 2014 19:24
Make a service restart more graceful
class classroom::master::wait_for_startup {
Service <| title == 'pe-puppetserver' |> {
hasrestart => true,
restart => "service pe-puppetserver restart && while true; do puppet status ${clientcert} --terminus rest && break; sleep 5; done"
}
Service <| title == 'pe-console-services' |> {
hasrestart => true,
restart => "service pe-console-services restart && while true; do curl http://localhost:4432/classifier-api/v1/last-class-update && break; sleep 5; done",
}

Keybase proof

I hereby claim:

  • I am mrzarquon on github.
  • I am mrzarquon (https://keybase.io/mrzarquon) on keybase.
  • I have a public key whose fingerprint is 7761 9BB7 53DF E567 66DF 11AE 9AD2 FACB 10C3 8462

To claim this, I am signing this object: