This file contains hidden or 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
| <% if @node[:chef][:client_log] -%> | |
| log_location "<%= @node[:chef][:client_log] %> | |
| <% else -%> | |
| log_location STDOUT | |
| <% end -%> |
This file contains hidden or 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
| aj@AJ-Christensens-MacBook (branch: master) ~/Development/chef$ sudo irb | |
| >> require 'rubygems' | |
| => false | |
| >> Gem.available? "mixlib-cli" | |
| => false | |
| >> `gem install mixlib-cli` | |
| => "Successfully installed mixlib-cli-1.0.4\n1 gem installed\nInstalling ri documentation for mixlib-cli-1.0.4...\nInstalling RDoc documentation for mixlib-cli-1.0.4...\n" | |
| >> Gem.available? "mixlib-cli" | |
| => false | |
| >> Gem.refresh |
This file contains hidden or 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
| DEBUG: Processing user[lachie] | |
| DEBUG: user[lachie] using Chef::Provider::User::Useradd | |
| DEBUG: Setting user[lachie] comment to Lachie Cox | |
| DEBUG: Managing the home directory for user[lachie] | |
| DEBUG: Executing usermod -c 'Lachie Cox' -m lachie | |
| DEBUG: Nothing to read on 'usermod -c 'Lachie Cox' -m lachie' STDOUT. | |
| DEBUG: ---- Begin usermod -c 'Lachie Cox' -m lachie STDERR ---- | |
| DEBUG: Usage: usermod [options] LOGIN | |
| Options: |
This file contains hidden or 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
| # Divine Panda | |
| service "foo" do | |
| action :nothing | |
| end | |
| template "/etc/foo/config.conf" do | |
| source "config.conf.erb" | |
| action :create | |
| notifies :restart, resources(:service => "foo") | |
| end |
This file contains hidden or 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
| --git a/chef-server-slice/Rakefile b/chef-server-slice/Rakefile | |
| index 8cb5b22..64d958e 100644 | |
| --- a/chef-server-slice/Rakefile | |
| +++ b/chef-server-slice/Rakefile | |
| @@ -47,7 +47,7 @@ Rake::GemPackageTask.new(spec) do |pkg| | |
| end | |
| desc "Install the gem" | |
| -task :install do | |
| +task :install => :package do |
This file contains hidden or 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
| # | |
| # Cookbook Name:: apt | |
| # Recipe:: default | |
| # | |
| # Copyright 2008, OpsCode, Inc. | |
| # | |
| # 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 | |
| # |
This file contains hidden or 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
| resources in cookbook: | |
| user "dnscache" do | |
| uid 9997 | |
| case node[:platform] | |
| when "ubuntu","debian" | |
| gid "nogroup" | |
| when "redhat", "centos" | |
| gid "nobody" | |
| else |
This file contains hidden or 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
| define :add_htpasswd_users do | |
| params[:users].each do |auth| | |
| execute "add_htpasswd_#{auth[:username]}" do | |
| command "echo '#{auth[:username]}:#{auth[:password]}' >> #{params[:name]}" | |
| not_if do | |
| if File.exists?(params[:name]) | |
| File.open(params[:name]) do |password_file| | |
| password_file.detect { |line| line =~ /#{auth[:username]}:#{auth[:password]}/ } | |
| end | |
| end |
This file contains hidden or 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
| node[:xen_vms].each do |name,vm| | |
| execute "create-vm" do | |
| command "xen-create-image --hostname #{name} --ip #{vm[:ip]} --size #{vm[:disk]} --memory #{vm[:memory]}" | |
| creates "/etc/xen/#{name}.cfg" | |
| notifies :run, resources("execute[start-vm") | |
| end | |
| execute "start-vm" do | |
| command => "xm create #{name}.cfg" | |
| unless "xm list | grep #{name}" |
This file contains hidden or 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
| service "apache2" do | |
| name value_for_platform( | |
| [ "CentOS", "RedHat", "Fedora", "SuSE" ] => { "default" => "httpd" }, | |
| "Ubuntu" => { "8.04.1" => "apache2_lolz", "default" => "apache2" }, | |
| "Debian" => { "default" => "apache2" } | |
| ) | |
| supports :restart => true | |
| action :enable | |
| end | |