Skip to content

Instantly share code, notes, and snippets.

@KristianLyng
Created May 20, 2015 14:18
Show Gist options
  • Select an option

  • Save KristianLyng/9da8f89dd6e40ea2fc06 to your computer and use it in GitHub Desktop.

Select an option

Save KristianLyng/9da8f89dd6e40ea2fc06 to your computer and use it in GitHub Desktop.
root@ara:/srv/chef-server/chef-repo# git diff
diff --git a/chef-repo/cookbooks/bind/recipes/server_flex.rb b/chef-repo/cookbooks/bind/recipes/server_flex.rb
index fde1358..b3dc0d0 100644
--- a/chef-repo/cookbooks/bind/recipes/server_flex.rb
+++ b/chef-repo/cookbooks/bind/recipes/server_flex.rb
@@ -54,7 +54,7 @@ masters.each do |master|
if not node[:bind][:autodigest].has_key?(master)
node[:bind][:autodigest][master] = { "foo" => "sukk" }
end
- if master[:type] == "" or master[:type] == "forward"
+ if bag[:type] == "" or bag[:type] == "forward"
nodes.each do |nod|
if not nod[:domain] == bag['name']
next
@@ -73,7 +73,7 @@ masters.each do |master|
end
end
end
- if master[:type] == "reverse"
+ if bag[:type] == "reverse"
nodes.each do |nod|
if not nod[:ipaddress].start_with?(bag['net'])
next
diff --git a/chef-repo/cookbooks/bind/templates/default/db.bakabo.net.erb b/chef-repo/cookbooks/bind/templates/default/db.bakabo.net.erb
index 6e3b003..cd39bee 100644
--- a/chef-repo/cookbooks/bind/templates/default/db.bakabo.net.erb
+++ b/chef-repo/cookbooks/bind/templates/default/db.bakabo.net.erb
@@ -63,9 +63,9 @@ end
if nod[:hostname] == nil
next
end
- if nod[:hostname][0] < 104
+ if nod[:hostname][0].ord < 104
fam = "0"
- elsif nod[:hostname][0] < 112
+ elsif nod[:hostname][0].ord < 112
fam = "1"
else
fam = "2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment