This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package "memcached" do | |
action :upgrade | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apache2": { | |
"versions": [ | |
{ | |
"url": "https://api.opscode.com/organizations/mycrotch/cookbooks/apache2/1.0.1", | |
"version": "1.0.1" | |
}, | |
{ | |
"url": "https://api.opscode.com/organizations/mycrotch/cookbooks/apache2/1.0.0", | |
"version": "1.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the app file | |
@helper = ChefHelper.new | |
@nodes = @helper.get_nodes | |
get '/' do | |
haml :index | |
end | |
.... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@helper = ChefHelper.new | |
@nodes = @helper.get_nodes | |
get '/' do | |
haml :index | |
end | |
get '/node/:name' do | |
@node = params[:name] | |
haml :nodes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' if RUBY_VERSION < "1.9" | |
require 'sinatra/base' | |
require 'Haml' | |
require 'chef' | |
require './chefhelper.rb' | |
class OpsTool < Sinatra::Base | |
@helper = ChefHelper.new | |
@nodes = @helper.get_nodes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
views/layout.haml | |
= haml 'shared/shared'.to_sym | |
views/shared/shared.haml | |
= haml 'shared/head'.to_sym | |
= yield | |
= haml 'shared/footer'.to_sym |
OlderNewer