Skip to content

Instantly share code, notes, and snippets.

View cwebberOps's full-sized avatar

Christopher Webber cwebberOps

View GitHub Profile
# No semi-colon
file {
'/path/to/file':
ensure => present
}
# Semi colon needed for first file, second file is just there for style consistency.
file {
'/path/to/file/a':
@cwebberOps
cwebberOps / gist:9083463
Created February 19, 2014 00:14
rspec against facter
Failure/Error: Facter.fact(:ipaddress).stubs(:value).returns ipaddress
NoMethodError:
undefined method `stubs' for #<Facter::Util::Fact:0x007ffa9257fd98>
@cwebberOps
cwebberOps / fix_hosts.sh
Created February 10, 2014 16:52
distract me less
#!/bin/bash
grep reddit /etc/hosts >/dev/null 2>&1
rc=$?
if [[ $rc != 0 ]]; then
echo "127.0.0.1 reddit.com www.reddit.com" >> /etc/hosts
fi
@cwebberOps
cwebberOps / anfile
Created January 29, 2014 18:08
An Thing
Change this stuff...
Again.
@cwebberOps
cwebberOps / gist:7250735
Created October 31, 2013 14:29
Become a Ham
For someone that is rather technical, you should be able to just pound the online exams and take the exam.
As for a radio, HRO (http://hamradio.com) has stores in Sunnyvale and Oakland
# Study Materials
- http://www.eham.net/exams/
- http://qrz.com/hamtest/
- https://ssl.qrz.com/bookstore (The Gordon West Book is used qute a bit)
# Register for an Exam
<link rel="alternate" type="application/rss+xml" title="Puppet Best Practices" href="html://www.puppetbestpractices.com/feed.xml" />
exec {'scl enable ruby-193 "gem install jekyll"':
creates => '/opt/rh/ruby193/usr/local/bin/jekyll'
}
{
"provisioners": [
{
"type": "shell",
"scripts": [
"scripts/dns.sh",
"scripts/dm-repos.sh",
"scripts/packages.sh",
"scripts/vagrant.sh",
"scripts/selinux.sh",
@cwebberOps
cwebberOps / PACKER_LOG=1
Last active December 19, 2015 05:19
Packer Fun
╰─$ PACKER_LOG=1 packer build template.json
2013/07/01 10:43:51 Detected home directory from env var: /Users/christopherwebber
2013/07/01 10:43:51 Attempting to open config file: /Users/christopherwebber/.packerconfig
2013/07/01 10:43:51 File doesn't exist, but doesn't need to. Ignoring.
2013/07/01 10:43:51 Packer config: &{PluginMinPort:0 PluginMaxPort:0 Builders:map[amazon-ebs:packer-builder-amazon-ebs digitalocean:packer-builder-digitalocean virtualbox:packer-builder-virtualbox vmware:packer-builder-vmware] Commands:map[build:packer-command-build validate:packer-command-validate] PostProcessors:map[vagrant:packer-post-processor-vagrant] Provisioners:map[shell:packer-provisioner-shell]}
2013/07/01 10:43:51 Setting cache directory: /Users/christopherwebber/projects/packer-dev/puppetos/packer_cache
2013/07/01 10:43:51 Environment.Cli: []string{"build", "template.json"}
2013/07/01 10:43:51 command + args: []string{"build", "template.json"}
2013/07/01 10:43:51 Loading command: build
2013/07/01 10:43:51 Creating
@cwebberOps
cwebberOps / template.json
Created June 30, 2013 03:46
packer template
{
"provisioners": [
{
"type": "shell",
"scripts": [
"scripts/postinstall.sh"
],
"override": {
"virtualbox": {
"execute_command": "echo 'vagrant'|sudo -S sh '{{.Path}}'"