Skip to content

Instantly share code, notes, and snippets.

View LMacchi's full-sized avatar

Laura Macchi LMacchi

  • @SplunkCloud
  • Denver, CO
  • 01:40 (UTC -06:00)
View GitHub Profile
@LMacchi
LMacchi / casc.yml
Last active July 19, 2023 22:03
Jenkins Configuration As Code
jenkins:
systemMessage: "Hello, world!"
@LMacchi
LMacchi / ubuntu_installer.log
Created September 20, 2018 05:03
Fresh (working) install in Ubuntu 16.04
root@master:/home/ubuntu/puppet-enterprise-2018.1.4-ubuntu-16.04-amd64# ./puppet-enterprise-installer -c /home/ubuntu/custom-pe.conf
/home/ubuntu/puppet-enterprise-2018.1.4-ubuntu-16.04-amd64 /home/ubuntu/puppet-enterprise-2018.1.4-ubuntu-16.04-amd64
=============================================================
Puppet Enterprise Installer
=============================================================
## We're installing the Puppet Agent...
2018-09-20T04:55:21.996+00:00 Running command: mkdir -p /opt/puppetlabs/server/data/packages/public/2018.1.4/ubuntu-16.04-amd64-5.5.6
2018-09-20T04:55:22.005+00:00 Running command: cp -r -L /home/ubuntu/puppet-enterprise-2018.1.4-ubuntu-16.04-amd64/packages/ubuntu-16.04-amd64/* /opt/puppetlabs/server/data/packages/public/2018.1.4/ubuntu-16.04-amd64-5.5.6
@LMacchi
LMacchi / keybase.md
Created September 17, 2018 20:59
keybase.md

Keybase proof

I hereby claim:

  • I am lmacchi on github.
  • I am calienteh (https://keybase.io/calienteh) on keybase.
  • I have a public key ASBzarqnH75vouXtvHjN4xvEyWzVl-MuoIBkWd6yvf7YKQo

To claim this, I am signing this object:

@LMacchi
LMacchi / bashrc
Created March 9, 2018 03:11
bashrc file
# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
return
fi
# Colours for my prompt
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
YELLOW=$(tput setaf 3)
BLUE=$(tput setaf 4)
[20] pry(#<ForgeVersions>)> data
=> [#<ForgeModule:0x007fabb9880f60 @depr=false, @found=true, @name="puppetlabs-stdlib", @version="4.17.1">,
#<ForgeModule:0x007fabb98ab738 @depr=false, @found=true, @name="puppetlabs-concat", @version="4.0.1">,
#<ForgeModule:0x007fabbb05f118 @depr=false, @found=true, @name="saz-ssh", @version="3.0.1">,
#<ForgeModule:0x007fabb9ca9a38 @depr=false, @found=true, @name="puppetlabs-apache", @version="2.0.0">,
#<ForgeModule:0x007fabb9a7a280 @depr=false, @found=true, @name="puppet-staging", @version="2.2.0">,
#<ForgeModule:0x007fabb9ab3da0 @depr=false, @found=true, @name="puppetlabs-mysql", @version="3.11.0">]
[21] pry(#<ForgeVersions>)> m
=> #<ForgeModule:0x007fabb9889048 @depr=false, @found=true, @name="puppet-staging", @version="2.2.0">
[22] pry(#<ForgeVersions>)> data[4]
@LMacchi
LMacchi / nodes.pp
Created March 14, 2017 14:29
Node groups
node_group { 'dfw':
ensure => present,
environment => 'production',
override_environment => false,
parent => 'default',
rule => ['or', ['=', 'name','master.puppetlabs.vm'], ['=', 'name','git.puppetlabs.vm']],
variables => {'site' => 'dfw'},
}
node_group { 'puppetmaster':
file { '/etc/motd':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
content => "Hey, Puppet is fun!\n",
}
package { 'cowsay':
ensure => present,
@LMacchi
LMacchi / Puppetfile
Created February 11, 2016 22:55
Remove zack r10k
mod "r10k",
:git => 'https://github.com/acidprime/r10k',
:ref => 'c219f3e8d3af6e0dd8b4b77236af1282f5fb98a5'
@LMacchi
LMacchi / migrate-code.sh
Last active February 10, 2016 21:18
Migrate script r10k -> code-manager
#!/bin/bash
# Vars
CONFFILE=`puppet agent --configprint config`
OLDCODEDIR='/etc/puppetlabs/puppet'
CODEDIR=`puppet agent --configprint codedir`
STGCODEDIR="$CODEDIR-staging"
R10KPRIVKEYDIR='/etc/puppetlabs/puppetserver/ssh'
# Let's get to work
if [ ! -d $STGCODEDIR ]; then
★ lmacchi@Titere 15:40:01 ~/.puppetlabs/etc/code/modules/test> cat manifests/init.pp
class test {
user { 'whatever': }
}
★ lmacchi@Titere 15:39:38 ~/.puppetlabs/etc/code/modules/test> puppet apply -e 'include test'
Notice: Compiled catalog for titere.local in environment production in 0.63 seconds
Notice: Applied catalog in 3.53 seconds
★ lmacchi@Titere 15:40:21 ~/.puppetlabs/etc/code/modules/test> puppet resource user whatever
user { 'whatever':
ensure => 'absent',