A while ago, the output from my knife commands (e.g. "knife node edit" -- which you should never use in production, by the way) changed from something like this:
{
"name": "i-27c2205f",
"chef_environment": "_default",
"normal": {
service 'true_guard' do | |
action :start | |
only_if { File.exist?('/tmp/trueguard') } | |
end | |
service 'false_guard' do | |
action :start | |
not_if { File.exist?('/tmp/falseguard') } | |
end |
Vagrant.configure("2") do |c| | |
c.vm.box = "opscode-freebsd-9.2" | |
c.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_freebsd-9.2_chef-provisionerless.box" | |
c.vm.hostname = "portsnap-freebsd-92.vagrantup.com" | |
c.vm.synced_folder ".", "/vagrant", disabled: true | |
c.vm.provider :virtualbox do |p| | |
p.customize ["modifyvm", :id, "--memory", "256"] | |
end | |
end |
borkbork ~/devel/gh/juliandunn/freebsd (master *)$ kitchen test portsnap-freebsd-92 --destroy=never | |
-----> Starting Kitchen (v1.2.1) | |
-----> Cleaning up any prior instances of <portsnap-freebsd-92> | |
-----> Destroying <portsnap-freebsd-92>... | |
Finished destroying <portsnap-freebsd-92> (0m0.00s). | |
-----> Testing <portsnap-freebsd-92> | |
-----> Creating <portsnap-freebsd-92>... | |
Bringing machine 'default' up with 'virtualbox' provider... | |
[default] Importing base box 'opscode-freebsd-9.2'... | |
[default] Matching MAC address for NAT networking... |
#!/usr/bin/ruby | |
require 'ruby_kml' | |
# http://www.boutell.com/zipcodes/ | |
# read zipcodes.csv into hash, get lat/long for each zip | |
zipcodes = {} | |
File.open('zipcode.csv', 'r') do |file| | |
file.each_line do |line| | |
entry = line.gsub('"','').split(",") |
#!/bin/bash | |
echo "First password prompt is for sudo" | |
# create the user | |
sudo dscl localhost -create /Local/Default/Users/amanda | |
sudo dscl localhost -create /Local/Default/Users/amanda RecordName amanda | |
sudo dscl localhost -create /Local/Default/Users/amanda UserShell /bin/bash | |
sudo dscl localhost -create /Local/Default/Users/amanda RealName "Amanda backup user" | |
sudo dscl localhost -create /Local/Default/Users/amanda UniqueID 5000 |
borkbork ~/devel/gh/juliandunn/chef-client (fix-kitchen-yml)$ kitchen test config-freebsd-92 | |
-----> Starting Kitchen (v1.1.1) | |
-----> Cleaning up any prior instances of <config-freebsd-92> | |
-----> Destroying <config-freebsd-92>... | |
Finished destroying <config-freebsd-92> (0m0.00s). | |
-----> Testing <config-freebsd-92> | |
-----> Creating <config-freebsd-92>... | |
Bringing machine 'default' up with 'virtualbox' provider... | |
[default] Importing base box 'opscode-freebsd-9.2'... | |
[default] Matching MAC address for NAT networking... |
irb(main):001:0> require 'chefspec' | |
=> true | |
irb(main):002:0> require 'chefspec/berkshelf' | |
RuntimeError: Berkshelf not found! You must have the berkshelf installed on your system before requiring chefspec/berkshelf. Install berkshelf by running: | |
gem install berkshelf | |
or add Berkshelf to your Gemfile: | |
gem 'berkshelf' |
borkbork ~/devel/gh/juliandunn/chef-client (fix-kitchen-yml *)$ kitchen test config-freebsd-92 | |
-----> Starting Kitchen (v1.1.0) | |
-----> Cleaning up any prior instances of <config-freebsd-92> | |
-----> Destroying <config-freebsd-92>... | |
Finished destroying <config-freebsd-92> (0m0.00s). | |
-----> Testing <config-freebsd-92> | |
-----> Creating <config-freebsd-92>... | |
Bringing machine 'default' up with 'virtualbox' provider... | |
[default] Box 'opscode-freebsd-9.2' was not found. Fetching box from specified URL for | |
the provider 'virtualbox'. Note that if the URL does not have |