Permalink
Browse files

DRYing up some code

  • Loading branch information...
1 parent 3bab7be commit 93ee8678a90d3c389667c578fce828cb5420d2ba @jfryman committed Dec 4, 2012
@@ -8,13 +8,11 @@
}
node /puppetmaster/ inherits basenode {
- $default_zone = stroller_orgname()
-
class { 'vagrant::hitch::load_dns': }
class { 'bind': }
- bind::zone { $default_zone:
+ bind::zone { $::domain:
zone_serial => '1',
zone_refresh => '604800',
zone_retry => '86400',
@@ -24,16 +22,16 @@
}
bind::ns { 'ns':
- zone => $default_zone,
+ zone => $::domain,
}
bind::record { 'ns':
- zone => $default_zone,
+ zone => $::domain,
target => $::ipaddress,
}
class { 'resolver::conf':
- domain_name => $default_zone,
+ domain_name => $::domain,
nameservers => $::ipaddress,
stage => 'setup_infra',
}
@@ -1,14 +0,0 @@
-require 'yaml'
-
-module Puppet::Parser::Functions
- newfunction(:stroller_orgname, :type => :rvalue) do |args|
- node_file = '/etc/vagrant/hitch/nodes.yml'
-
- if File.exists? node_file
- nodes = YAML::load(File.open(node_file))
- nodes['default'].has_key?('orgname') ? nodes['default']['orgname'] : "vagrant.dev"
- else
- 'vagrant.dev'
- end
- end
-end

0 comments on commit 93ee867

Please sign in to comment.