Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add default attributes to the dns-server role.

  • Loading branch information...
commit 9975990d2b6ef2e938adcc17453f6ce605337ea1 1 parent d90dc25
@VictorLowther VictorLowther authored
View
4 bc-template-dns.json
@@ -3,8 +3,8 @@
"description": "manages the DNS subsystem for the cluster",
"attributes": {
"dns": {
- "domain": "pod.your.cloud.org",
- "contact": "support@pod.your.cloud.org",
+ "domain": "",
+ "contact": "support@localhost.localdomain",
"forwarders": [ ],
"static": { }
}
View
5 chef/cookbooks/bind9/recipes/default.rb
@@ -35,6 +35,11 @@
node[:dns][:zone_files]=Array.new
+if (node[:dns][:domain] rescue String.new) == ""
+ node[:dns] ||= Mash.new
+ node[:dns][:domain] = node[:fqdn].split('.')[1..-1].join(".")
+end
+
def populate_soa_defaults(zone)
[ :admin,
:ttl,
View
8 chef/roles/dns-server.rb
@@ -4,6 +4,12 @@
run_list(
"recipe[bind9]"
)
-default_attributes()
+default_attributes "dns" => {
+ "static" => {},
+ "forwarders" => [],
+ "domain" => "",
+ "contact" => "support@localhost.localdomain",
+ "config" => { "environment" => "dns-base-config" }
+}
override_attributes()
Please sign in to comment.
Something went wrong with that request. Please try again.