Skip to content

Instantly share code, notes, and snippets.

View smalltown's full-sized avatar

smalltown

View GitHub Profile
<html>
<body>
<h1>Welcome to <%= node["motd"]["company"] %></h1>
<h2>We love <%= @site_name %></h2>
<%= node["ipaddress"] %>:<%= @port %>
</body>
</html>
name "webserver"
description "Web Server"
run_list "recipe[apache]"
default_attributes({
"apache" => {
"sites" => {
"admin" => {
"port" => 8000
}
}
name "webserver"
description "Web Server"
run_list "recipe[apache]"
default_attributes({
"apache" => {
"sites" => {
"admin" => {
"port" => 8000
},
"bears" => {
name "dev"
description "For developers!"
cookbook "apache", "= 0.2.0"
name "production"
description "For Prods!"
cookbook "apache", "= 0.1.0"
override_attributes({
"pci" => {
"in_scope" => true
}
})
{
"id": "bobo",
"comment": "Bobo T. Clown",
"uid": 2000,
"gid": 0,
"home": "/home/bobo",
"shell": "/bin/bash"
}
{
"id": "frank",
"comment": "Frank Belson",
"uid": 2001,
"gid": 0,
"home": "/home/frank",
"shell": "/bin/bash"
}
{
"id": "clowns",
"gid": 3000,
"members": ["bobo", "frank"]
}
#
# Cookbook Name:: users
# Recipe:: default
#
# Copyright (c) 2016 The Authors, All Rights Reserved.
search("users", "*:*").each do |user_data|
user user_data["id"] do
comment user_data["comment"]
uid user_data["uid"]
search("groups", "*:*").each do |group_data|
group group_data["id"] do
gid group_data["gid"]
members group_data["members"]
end
end