Skip to content

Instantly share code, notes, and snippets.

View jonlives's full-sized avatar

Jon Cowie jonlives

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jonlives on github.
  • I am jonlives (https://keybase.io/jonlives) on keybase.
  • I have a public key whose fingerprint is B2DD 000D 6BE0 871E A83A AC09 26E3 4C2C 2EEC DF76

To claim this, I am signing this object:

#
# Author:: John E. Vincent <lusis.org+github.com@gmail.com>
# Copyright:: Copyright (c) 2012, John E. Vincent
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@jonlives
jonlives / gist:252975018ad596613aca
Created September 4, 2014 17:07
Skeleton repository produced by "chef generate repo"
.
├── LICENSE
├── README.md
├── chefignore
├── cookbooks
│   ├── README.md
│   ├── example
│   │   ├── attributes
│   │   │   └── default.rb
│   │   └── recipes
loading configuration: /etc/chef/client.rb
Session type: client
Loading..resolving cookbooks for run list: <snip>
.....Synchronizing Cookbooks:
epic fail!
/opt/chef/embedded/lib/ruby/1.9.1/net/http.rb:2789:in `stream_check': undefined method `closed?' for nil:NilClass (NoMethodError)
from /opt/chef/embedded/lib/ruby/1.9.1/net/http.rb:2709:in `read_body'
from /opt/chef/embedded/lib/ruby/1.9.1/net/http.rb:2736:in `body'
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2/lib/chef/formatters/error_inspectors/api_error_formatting.rb:90:in `rescue in format_rest_error'
{
"ec2": {
"instance_type": "t1.micro",
}
}
bash -c '
if [ ! -f /usr/bin/chef-client ]; then
echo "chef chef/chef_server_url string <%= Chef::Config[:chef_server_url] %>" | debconf-set-selections
[ -f /etc/apt/sources.list.d/opscode.list ] || echo "deb http://apt.opscode.com lenny main" > /etc/apt/sources.list.d/opscode.list
wget -O- http://apt.opscode.com/packages@opscode.com.gpg.key | apt-key add -
fi
apt-get update
apt-get install -y chef
<% unless Chef::Config[:validation_client_name] == "chef-validator" -%>
function tabc {
NAME=$1; if [ -z "$NAME" ]; then NAME="Default"; fi
osascript -e "tell application \"Terminal\" to set current settings of front window to settings set \"$NAME\""
}
function ssh {
tabc "Solarized Dark"
/usr/bin/ssh "$@"
tabc "Homebrew"
}
# cobbler module configuration file
# =================================
# authentication:
# what users can log into the WebUI and Read-Write XMLRPC?
# choices:
# authn_denyall -- no one (default)
# authn_configfile -- use /etc/cobbler/users.digest (for basic setups)
# authn_passthru -- ask Apache to handle it (used for kerberos)
# authn_ldap -- authenticate against LDAP
Tue Jul 26 14:43:12 2011 - INFO | Exception occured: <class 'cobbler.cexceptions.CX'>
Tue Jul 26 14:43:12 2011 - INFO | Exception value: 'login failed (joncowie)'
Tue Jul 26 14:43:12 2011 - INFO | Exception Info:
File "/usr/local/lib/python2.6/dist-packages/cobbler/remote.py", line 1743, in _dispatch
return method_handle(*params)
File "/usr/local/lib/python2.6/dist-packages/cobbler/remote.py", line 1572, in login
utils.die(self.logger, "login failed (%s)" % login_user)
File "/usr/local/lib/python2.6/dist-packages/cobbler/utils.py", line 130, in die
raise CX(msg)
package "memcached" do
action :upgrade
end