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
begin | |
# load wirble | |
require 'wirble' | |
# start wirble (with color) | |
Wirble.init | |
Wirble.colorize | |
rescue LoadError => err | |
warn "Couldn't load Wirble: #{err}" | |
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
# Guardfile for testing this cookbook | |
guard :rubocop do | |
watch(%r{.+\.rb$}) | |
watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) } | |
end | |
guard :foodcritic, cookbook_paths: '.' do | |
watch(%r{attributes/.+\.rb$}) | |
watch(%r{providers/.+\.rb$}) | |
watch(%r{recipes/.+\.rb$}) |
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
#!/bin/bash | |
usage="This script should be run from the main directory of your cookbook.\n Usage: $0 cookbookname" | |
# Did the user supply a cookbook name? Are we in a cookbook directory? | |
if [ $# -ne 1 ] || [ ! -f metadata.rb ]; then | |
echo -e $usage; exit 1 | |
fi | |
cookbook=$1 | |
knife spork bump $cookbook | |
git add . |
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
use_inline_resources | |
action :create do | |
resource_name = new_resource.file_name.gsub('/', '_') | |
execute "create#{resource_name}" do | |
command "dd if=/dev/zero of=#{new_resource.file_name} bs=1024 count=#{new_resource.blocks}" | |
not_if { ::File.exists?(new_resource.file_name) } | |
notifies :run, "execute[mkswap#{resource_name}]", :immediately |
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 | |
# | |
package "httpd" 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
#!/bin/sh | |
red='\033[1;31m' | |
green='\033[1;32m' | |
blue='\033[1;34m' | |
normal='\033[0m' | |
bg_white='\033[1;47m' | |
echo "$green _______________ $normal" | |
echo "$green / ___/ __/_ __/ $normal" |
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
--- | |
driver: | |
name: vagrant | |
provisioner: | |
name: chef_solo | |
platforms: | |
- name: ylinux6 | |
driver_config: |
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 @port != 80 -%> | |
Listen <%= @port %> | |
<% end -%> | |
<VirtualHost *:<%= @port %>> | |
ServerAdmin webmaster@localhost | |
DocumentRoot <%= @document_root %> | |
<Directory /> | |
Options FollowSymLinks |
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
Fetching 'apache' from source at . | |
Fetching cookbook index from https://api.berkshelf.com... | |
←[31m>>>>>> ------Exception-------←[0m | |
←[31m>>>>>> Class: Kitchen::ActionFailed←[0m | |
←[31m>>>>>> Message: Failed to complete #converge action: [SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed]←[0m | |
←[31m>>>>>> ----------------------←[0m | |
←[31m>>>>>> Please see .kitchen/logs/kitchen.log for more details←[0m | |
←[31m>>>>>> Also try running `kitchen diagnose --all` for configuration | |
←[0m |
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
➜ jenkins git:(master) ✗ kitchen init | |
create .kitchen.yml | |
run gem install kitchen-vagrant from "." | |
Fetching: kitchen-vagrant-0.15.0.gem (100%) | |
ERROR: While executing gem ... (Gem::FilePermissionError) | |
You don't have write permissions for the /opt/chefdk/embedded/lib/ruby/gems/2.1.0 directory. |