Skip to content

Instantly share code, notes, and snippets.

Chris Barker mrzarquon

Block or report user

Report or block mrzarquon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mrzarquon
mrzarquon / No provider needed
Created May 3, 2019
puppet hash to yaml file
View No provider needed
$config_hash = {
'hosts' => $hosts.sort(),
'metrics_type' => $metrics_type,
'metrics_port' => $metrics_port,
'additional_metrics' => $additional_metrics,
'clientcert' => $::clientcert,
'pe_version' => $facts['pe_server_version'],
'ssl' => $ssl,
}
View gist:dbf7a0900c468d5f8d60641a5ad69a7c
get the puppet ca
curl -k https://puppetserver:8140/puppet-ca/v1/certificate/ca
View keybase.md

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 96A4 CE6F 1697 213B 1E32 1556 2E3F 88DD 8BA8 D892

To claim this, I am signing this object:

View gist:7adf72dc76623ac670e2
#!/bin/bash
# lazily modified from here: http://unix.stackexchange.com/questions/204069/all-possible-combinations-of-characters-and-numbers
for c1 in {A..Z} {a..z} {0..9}
do
for c2 in {A..Z} {a..z} {0..9}
do
for c3 in {A..Z} {a..z} {0..9}
do
for c4 in {A..Z} {a..z} {0..9}
View keybase.md

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:

@mrzarquon
mrzarquon / gist:be2860937d729c2c74de
Created Dec 16, 2014
Make a service restart more graceful
View gist:be2860937d729c2c74de
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",
}
@mrzarquon
mrzarquon / gist:0d2e198f26960c4ffb14
Created Nov 2, 2014
show_classification.sh "PE Master" - to see the full json rule / configuration for the "PE Master" classification group in the console
View gist:0d2e198f26960c4ffb14
#!/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"
View gist:7330341
## 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':
View gist:6020701
#!/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"
View top 10
['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]
You can’t perform that action at this time.