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
#!/bin/env/ruby | |
require 'net/http' | |
require 'rubygems' | |
require 'json' | |
require 'logger' | |
couch_server = "http://localhost:5984/" | |
active_tasks = ['_active_tasks'] | |
couch_db = 'chef/' |
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
name "appserver" | |
description "this is a sample chef role for an app server" | |
default_attributes "config" => { | |
"firewall" => { | |
"rules" => ["ACCEPT net fw tcp 80","ACCEPT net fw tcp 8080",ACCEPT net fw tcp 22"] | |
} | |
} | |
run_list( | |
"recipe[ror]", | |
"recipe[shorewall]" |
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
#Rules Created by Chef | |
<% @rule_list.each do |rule| -%> | |
<%= rule %> | |
<% 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
config_path = "/etc/shorewall" | |
package "shorewall" | |
cookbook_file "/etc/default/shorewall" do | |
source "shorewall-enable" | |
mode 0644 | |
owner "root" | |
group "root" | |
end |
NewerOlder