Skip to content

Instantly share code, notes, and snippets.

View smalltown's full-sized avatar

smalltown

View GitHub Profile
name "production"
description "For Prods!"
cookbook "apache", "= 0.1.0"
override_attributes({
"pci" => {
"in_scope" => true
}
})
name "dev"
description "For developers!"
cookbook "apache", "= 0.2.0"
name "webserver"
description "Web Server"
run_list "recipe[apache]"
default_attributes({
"apache" => {
"sites" => {
"admin" => {
"port" => 8000
},
"bears" => {
name "webserver"
description "Web Server"
run_list "recipe[apache]"
default_attributes({
"apache" => {
"sites" => {
"admin" => {
"port" => 8000
}
}
<html>
<body>
<h1>Welcome to <%= node["motd"]["company"] %></h1>
<h2>We love <%= @site_name %></h2>
<%= node["ipaddress"] %>:<%= @port %>
</body>
</html>
<% if @port != 80 -%>
Listen <%= @port %>
<% end -%>
<VirtualHost *:<%= @port %>>
ServerAdmin webmaster@localhost
DocumentRoot <%= @document_root %>
<Directory />
Options FollowSymLinks
#
# Cookbook Name:: apache
# Recipe:: default
#
# Copyright (c) 2016 The Authors, All Rights Reserved.
package "apache2" do
action :install
end
This server is property of <%= node["motd"]["company"] %>
<% if node["pci"]["in_scope"] -%>
This server is in-scope for PCI compliance
<% end -%>
#
# Cookbook Name:: motd
# Recipe:: default
#
# Copyright (c) 2016 The Authors, All Rights Reserved.
template "/etc/motd" do
source "motd.erb"
mode "0644"
end
<html>
<body>
<h1>Hello, world!</h1>
</body>
</html>