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
# This is a Chef recipe file. It can be used to specify resources which will | |
# apply configuration to a server. | |
log "Welcome to Chef, #{node["starter_name"]}!" do | |
level :info | |
cookbook_file "helloworld.txt" do | |
path "/Users/rossmohan/HELLOWORLD.TXT" | |
action :create_if_missing | |
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
{"foo" => "1.0", "bar" => "latest"}.each do |pkg,ver| | |
if ver == "latest" | |
yum_package pkg do | |
action :upgrade | |
end | |
else | |
yum_package pkg do | |
version ver | |
action :install | |
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
# cookbooks/maldetect/attributes/attributes.rb | |
default["maldetect"]["version"] = "1.4.2" | |
default["maldetect"]["checksum"] = "e118760d2440832564ac72977abb95a6141c25b520f21dfa30a89e1f6c835d63" |
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
default[:vertx][:version] = '2.0.2' | |
default[:vertx][:home] = '/srv/vertx' | |
default[:vertx][:url] = 'http://dl.bintray.com/vertx/downloads/' | |
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
# cookbooks/users/attributes/default.rb | |
default["sudo"]["users"] = ["userA", "userB"] |
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:: apache | |
# Recipe:: default | |
# | |
# Copyright 2013, YOUR_COMPANY_NAME | |
# | |
# All rights reserved - Do Not Redistribute | |
# | |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# This is a Vagrant configuration file. It can be used to set up and manage | |
# virtual machines on your local system or in the cloud. See http://downloads.vagrantup.com/ | |
# for downloads and installation instructions, and see http://docs.vagrantup.com/v2/ | |
# for more information and configuring and using Vagrant. | |
Vagrant.configure("2") do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, |
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:: calagator | |
# Recipe:: default | |
# | |
# Copyright 2013, YOUR_COMPANY_NAME | |
# | |
# All rights reserved - Do Not Redistribute | |
# | |
include_recipe "database::postgresql" |
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
data_bag("vhosts").each do |site| | |
site_data = data_bag_item("vhosts", site) | |
site_name = site_data["id"] | |
document_root = "/srv/apache/#{site_name}" | |
template "/etc/apache2/sites-available/#{site_name}" do | |
source "custom-vhost.erb" | |
mode "0644" | |
variables( | |
:document_root => document_root, |
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
cookbooks/foo/recipes/default.rb | |
# | |
# Cookbook Name:: foo | |
# Recipe:: default | |
# | |
# Copyright 2013, YOUR_COMPANY_NAME | |
# | |
# All rights reserved - Do Not Redistribute | |
# |