Skip to content

Instantly share code, notes, and snippets.

View malnick's full-sized avatar
💭
🦄 Figment of your imagination

Jeff Malnick malnick

💭
🦄 Figment of your imagination
  • Boonville, CA
View GitHub Profile
@malnick
malnick / gist:8339620
Created January 9, 2014 18:45
Ruby YAML to JSON error
root@bohr:/Users/malnick/projects/banyan/www → ruby -ryaml -rjson -e 'JSON.pretty_generate(YAML.load_file("last_run_report.yaml"))'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:334:in `path2class': undefined class/module Puppet:: (ArgumentError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:334:in `resolve_class'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:178:in `visit_Psych_Nodes_Mapping'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visitors/visitor.rb:15:in `visit'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visitors/visitor.rb:5:in `accept'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visitors/to_ruby.rb:20:in `accept'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych/visito
@malnick
malnick / gist:8339719
Created January 9, 2014 18:50
YAML to JSON Error
root@bohr:/Users/malnick/projects/banyan/www → ruby -rpuppet -ryaml -rjson -e 'JSON.pretty_generate(YAML.load_file("last_run_report.yaml"))'
/Library/Ruby/Gems/2.0.0/gems/json_pure-1.8.1/lib/json/common.rb:285:in `generate': only generation of JSON objects or arrays allowed (JSON::GeneratorError)
from /Library/Ruby/Gems/2.0.0/gems/json_pure-1.8.1/lib/json/common.rb:285:in `pretty_generate'
from -e:1:in `<main>'
root@bohr:/Users/malnick/projects/banyan/www →
@malnick
malnick / gist:8357056
Created January 10, 2014 16:03
Boxen DTrace - No Process
root@heisenberg [/private/tmp]$dtrace curl -s https://boxen.company.com/script/abc123.sh > /tmp/install-boxen; bash /tmp/install-boxen
dtrace: no probes specified
@malnick
malnick / gist:8379772
Created January 12, 2014 02:19
wtf is zsh doing?
# rake new_post["Zombie Ninjas Attack: A survivor's retrospective"] root@bohr
zsh: no matches found: new_post[Zombie Ninjas Attack: A survivor's retrospective]
±|master ✘| octopress
±|master ✘| octopress
# rake generate root@bohr
## Generating Site with Jekyll
unchanged sass/screen.scss
Configuration from /Users/malnick/projects/blog/octopress/_config.yml
Building site: source -> public
YAML Exception reading 2014-01-06-puppet-run-vis.markdown: (<unknown>): could not find expected ':' while scanning a simple key at line 6 column 1
@malnick
malnick / gist:8407605
Created January 13, 2014 20:35
PuppetDB Error
[root@master ~]# puppet agent --test
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 400 on SERVER: Could not retrieve facts for master.puppetlabs.vm: Failed to find facts from PuppetDB at master.puppetlabs.vm:8081: Connection refused - connect(2)
Info: Retrieving plugin
Info: Loading facts in /etc/puppetlabs/puppet/modules/fundamentals/lib/facter/root_ssh_key.rb
Info: Loading facts in /etc/puppetlabs/puppet/modules/fundamentals/lib/facter/fundamentals_pe_version.rb
Info: Loading facts in /opt/puppet/share/puppet/modules/postgresql/lib/facter/postgres_default_version.rb
Info: Loading facts in /opt/puppet/share/puppet/modules/pe_puppetdb/lib/facter/puppetdb_server_status.rb
Info: Loading facts in /opt/puppet/share/puppet/modules/stdlib/lib/facter/pe_version.rb
Info: Loading facts in /opt/puppet/share/puppet/modules/stdlib/lib/facter/root_home.rb
-*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "centos-64-x64-nocm"
config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-fusion503-nocm.box"
On my agent:
root@timeagent puppet]# rm -rf ssl/
[root@timeagent puppet]# puppet agent -t
Info: Creating a new SSL key for timeagent.puppetlabs.vm
Info: Caching certificate for ca
Info: Creating a new SSL certificate request for timeagent.puppetlabs.vm
Info: Certificate Request fingerprint (SHA256): F7:58:9F:AC:92:9E:44:61:BE:51:05:7D:BB:55:1E:1F:7B:78:A6:7C:09:4D:65:6D:B5:59:8E:AC:B9:CC:D2:E0
Exiting; no certificate found and waitforcert is disabled
[root@timeagent puppet]# puppet agent -t
@malnick
malnick / gist:9124296
Created February 20, 2014 22:07
Best Practices Idea
## Wordpress Deployment using Puppet Best Pracices
This is a wordpress module that deploys a wordpress blog using puppet best
practices. It's not meant to be a production module but rather an instancia
tion of the CURRENT best practices we at Puppet promote.
This module defines our wordpress blog using the following modules:
- hunner/wordpress
- puppetlabs/apache
root@bohr [/Users/malnick/projects/courseware/fundamentals]$ ls
root@bohr [/Users/malnick/projects/courseware/fundamentals]$ cd ..
root@bohr [/Users/malnick/projects/courseware]$ ls
.git InstructorGuide.md Templates
.gitignore Language_Constructs Windows
About_Puppet Live_Management _demos
Advanced_Classes Mini_Fundamentals _files
Appendix Mini_Fundamentals.json _fonts
Capstone_Lab Mini_Fundamentals_part2.json _images
Classification Modules_and_Classes _instructor
⚡ root@bohr  /Users/malnick/projects/courseware  ± master  rake prepare
Start the presentation by running `rake present`.
AFter you have finished the training, please run `rake submit` to send collected stats back to the Edu team.
⚡ root@bohr  /Users/malnick/projects/courseware  ± master  cd fundamentals
⚡ root@bohr  /Users/malnick/projects/courseware/fundamentals  ± master  rake present
What version is printed at the bottom of the course manuals you received? [v3.2.0] v3.1.4
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
WARN: image sizing disabled - install rmagick