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
bash "add multiverse source repository " do | |
user "root" | |
code "bash < <( sed -E 's/^#.*(deb.*multiverse)$/\\1/g' -i /etc/apt/sources.list )" | |
notifies :run, "execute[apt-get update]", :immediately | |
end | |
execute "apt-get update" do | |
action :nothing | |
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
require 'active_support/time' | |
bucket = Fog::Storage.new(:provider => 'AWS').directories.select {|d| d.key == 'my_bucket'} | |
files = bucket.files.select {|f| f.content_length > 0 && | |
f.key =~ %r{client-name.*\.zip}} | |
expiration = Time.now.next_month.end_of_month | |
signed_urls = files.map {|f| f.url(expiration)} | |
fixed_signed_url = signed_urls.map do |su| | |
su.sub(%r{s3\.(.*)/my_bucket}, "my_bucket.s3.#{$1}") | |
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
This is a cookbook called <%= @cookbook_name %> |
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[::groups] = [ "foo","bar","baz" ] |
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
# A sample Guardfile | |
# More info at https://github.com/guard/guard#readme | |
require 'guard/guard' | |
require 'mixlib/shellout' | |
module ::Guard | |
class Kitchen < ::Guard::Guard | |
def start | |
::Guard::UI.info("Guard::Kitchen is starting") |
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
plain_pass = Chef::EncryptedDataBagItem.load("aws-admin-passwords", "svc_goagent")["password"] | |
p plain_pass | |
#if unix box | |
if node['platform'] == 'ubuntu' | |
chef_gem "ruby-shadow" | |
package "whois" | |
unless node.attribute? "svc_goagent_pass" |
OlderNewer