This file contains 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "ReadOnlySharedBucket", | |
"Effect": "Allow", | |
"Action": [ | |
"s3:Get*", | |
"s3:List*" | |
], |
This file contains 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
#!/usr/bin/env python | |
import os, urllib, json | |
uri = os.environ['AWS_CONTAINER_CREDENTIALS_RELATIVE_URI'] | |
url = "http://169.254.170.2{}".format(uri) | |
data = json.loads(urllib.urlopen(url).read()) | |
print """export AWS_ACCESS_KEY_ID={AccessKeyId} | |
export AWS_SECRET_ACCESS_KEY={SecretAccessKey} | |
export AWS_SESSION_TOKEN={Token} |
This file contains 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
{%- set nodes = salt['saltutil.runner']('mine.get', | |
tgt='G@ec2_tags:Environment:Ether', | |
fun='agent_uuid', | |
tgt_type='compound').values()|map(attribute='myapp:agent:uuid')|list %} |
This file contains 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
- url: /api/v1/user | |
script: user | |
# Requires login + admin | |
login: admin | |
auth_fail_action: unauthorized | |
- url: /api/v1/user/view | |
script: user.view | |
# Requires login but not admin | |
login: required |
This file contains 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 'chef/provisioning' | |
machine 'mario' do | |
tag 'itsa_me' | |
end | |
chef-client -z provision.rb | |
DL is deprecated, please use Fiddle |
This file contains 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
================================================================================ | |
Recipe Compile Error in /tmp/kitchen/cookbooks/iii/recipes/default.rb | |
================================================================================ | |
NoMethodError | |
------------- | |
Undefined method or attribute `action' on `node' | |
This file contains 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
remote_file "/tmp/myfile.tmp" do | |
source "http://example.com/test.tmp" | |
checksum "incorrect_should_cause_redownload" | |
retries 3 | |
retry_delay 20 | |
end |
This file contains 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
last_checksum = File.open(last_file) do | f | | |
md5 = Digest::MD5.new | |
buffer = "" | |
md5.update(buffer) while f.read(4096, buffer) | |
md5 | |
end |
This file contains 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 | |
roles_path: "../../roles" | |
environments_path: "../../environments" | |
platforms: |
NewerOlder