I hereby claim:
- I am tfitch on github.
- I am tfitch (https://keybase.io/tfitch) on keybase.
- I have a public key whose fingerprint is 4272 7EC0 E696 8F14 379E 3EE6 A825 0CFB 25FF 8901
To claim this, I am signing this object:
# Our .tmux.conf file | |
# Setting the prefix from C-b to C-a | |
# START:prefix | |
set -g prefix C-a | |
# END:prefix | |
# Free the original Ctrl-b prefix keybinding | |
# START:unbind | |
unbind C-b | |
# END:unbind |
[appdefaults] | |
{ | |
example.com { | |
kdc = x1.example.com:88, | |
kdc = x2.example.com:88, | |
kdc = x3.example.com:88, | |
kdc = x4.example.com:88, | |
kdc = x5.example.com:88, | |
kdc = x6.example.com:88, | |
kdc = exampledcoce.example.com:88, |
# the key here is line 4 where the node.chef_environment will match an element of the JSON | |
keyfile_bag = Chef::EncryptedDataBagItem.load("mongodb", "keyfiles") | |
file '/apps/mongodb-linux-x86_64-2.4.8/conf/mongodb.key' do | |
content keyfile_bag[node.chef_environment]['keyfile'] | |
owner 'mongo' | |
group 'mongo' | |
mode 00700 | |
action :create_if_missing | |
end |
I hereby claim:
To claim this, I am signing this object:
rsconf = { | |
"_id" : "<% replicaset %>", | |
"version" : 1, | |
"members" : [ | |
<% idCounter = 1 %> | |
<%- @secondaries.each do |secondary| %> | |
{ | |
"_id" : <%= idCounter %>, | |
"host" : "<%= secondary.fqdn %>:27017" | |
}, |
# some stuff was probably above here | |
# chef_environment might look redundant, but it will find machine in the same environment this machine is configured for | |
secondaries = search(:node, "role:mongodb-secondary AND chef_environment:#{node.chef_environment} AND mongodb_replica_set:#{node.mongodb.replica_set}") | |
# pass them in to the template below | |
template '/apps/mongodb/conf/replicaset.js' do | |
owner 'mongodb' | |
group 'users' | |
mode '0755' |
knife search node "role:mongo AND chef_environment:dev AND mongodb_replica_set:ReplSet1" |
# same result as hardcoded-recipe.rb but now driven by Attributes | |
iis_pool 'MyAppPool' do | |
node['config']['setting'].each do |setting, value| | |
send(setting, value) | |
end | |
action :config | |
end |
# outputs the same as hardcoded-recipe.rb but does *not* work | |
iis_pool 'MyAppPool' do | |
node['config']['setting'].each do |setting, value| | |
"#{setting}" "#{value}" | |
end | |
action :config | |
end |
# attributes for the iis_pool | |
default['config']['setting']['runtime_version'] = '12' | |
default['config']['setting']['thirty_two_bit'] = false | |
default['config']['setting']['max_proc'] = 4 |