Permalink
Browse files

Fix puppet-lint warnings

  • Loading branch information...
ekohl committed Jun 12, 2012
1 parent 7ab5f90 commit c045bf8c307293bf54f355deef67b08e56673fe5
Showing with 28 additions and 28 deletions.
  1. +4 −4 manifests/disable.pp
  2. +2 −2 manifests/host.pp
  3. +17 −17 manifests/init.pp
  4. +1 −1 manifests/pool.pp
  5. +4 −4 tests/init.pp
View
@@ -10,15 +10,15 @@
$logfacility = $dhcp::params::logfacility
package {
- "isc-dhcp-server":
+ $dhcp::params::packagename:
ensure => absent;
}
service {
- "isc-dhcp-server":
+ $dhcp::params::servicename:
+ ensure => stopped,
enable => false,
- ensure => "stopped",
hasstatus => true,
- require => Package["isc-dhcp-server"];
+ require => Package[$dhcp::params::packagename];
}
}
View
@@ -9,8 +9,8 @@
$dhcp_dir = $dhcp::params::dhcp_dir
- concat::fragment { "dhcp.hosts+10_${name}.hosts"
- content => template("dhcp/dhcpd.host.erb"),
+ concat::fragment { "dhcp.hosts+10_${name}.hosts":
+ content => template('dhcp/dhcpd.host.erb'),
}
}
View
@@ -3,7 +3,7 @@
$nameservers,
$ntpservers,
$interfaces = undef,
- $interface = "NOTSET",
+ $interface = 'NOTSET',
$dnsupdatekey = undef,
$pxeserver = undef,
$pxefilename = undef,
@@ -20,25 +20,25 @@
# Incase people set interface instead of interfaces work around
# that. If they set both, use interfaces and the user is a unwise
# and deserves what they get.
- if $interface != "NOTSET" and $interfaces == undef {
+ if $interface != 'NOTSET' and $interfaces == undef {
$dhcp_interfaces = [ $interface ]
- } elsif $interface == "NOTSET" and $interfaces == undef {
+ } elsif $interface == 'NOTSET' and $interfaces == undef {
fail ("You need to set \$interfaces in $module_name")
} else {
$dhcp_interfaces = $interfaces
}
package {
- "$packagename":
+ $packagename:
ensure => installed,
- provider => $operatingsystem ? {
+ provider => $::operatingsystem ? {
default => undef,
darwin => macports
}
}
# Only debian and ubuntu have this style of defaults for startup.
- case $operatingsystem {
+ case $::operatingsystem {
'debian','ubuntu': {
file{ '/etc/default/isc-dhcp-server':
ensure => present,
@@ -56,29 +56,29 @@
order => ['*.dhcp'],
target => "${dhcp_dir}/dhcpd.conf",
require => Package[$packagename],
- notify => [Service["$servicename"],File["${dhcp_dir}/dhcpd.conf"]],
+ notify => [Service[$servicename],File["${dhcp_dir}/dhcpd.conf"]],
}
file { "${dhcp_dir}/dhcpd.conf":
owner => 'root',
group => 'root',
- mode => 0644,
+ mode => '0644',
require => Package[$packagename],
}
- concat_fragment { "dhcp.conf+01_main.dhcp":
- content => template("dhcp/dhcpd.conf.erb"),
+ concat_fragment { 'dhcp.conf+01_main.dhcp':
+ content => template('dhcp/dhcpd.conf.erb'),
}
concat_build { 'dhcp.hosts':
order => ['*.hosts'],
target => "${dhcp_dir}/dhcpd.hosts",
require => Package[$packagename],
- notify => [Service["$servicename"],File["${dhcp_dir}/dhcpd.hosts"]],
+ notify => [Service[$servicename],File["${dhcp_dir}/dhcpd.hosts"]],
}
file { "${dhcp_dir}/dhcpd.hosts":
owner => 'root',
group => 'root',
- mode => 0644,
+ mode => '0644',
require => Package[$packagename],
}
@@ -87,12 +87,12 @@
}
service {
- "$servicename":
- enable => "true",
- ensure => "running",
+ $servicename:
+ ensure => running,
+ enable => true,
hasstatus => true,
- subscribe => [File["${dhcp_dir}/dhcpd.hosts"], File["${dhcp_dir}/dhcpd.conf"]],
- require => Package["$packagename"];
+ subscribe => File["${dhcp_dir}/dhcpd.hosts", "${dhcp_dir}/dhcpd.conf"],
+ require => Package[$packagename],
}
}
View
@@ -10,7 +10,7 @@
$dhcp_dir = $dhcp::params::dhcp_dir
concat_fragment { "dhcp.conf+70_${name}.dhcp":
- content => template("dhcp/dhcpd.pool.erb"),
+ content => template('dhcp/dhcpd.pool.erb'),
}
}
View
@@ -8,8 +8,8 @@
nameservers => ['10.1.1.10'],
ntpservers => ['us.pool.ntp.org'],
interfaces => ['eth0'],
- dnsupdatekey => "/etc/bind/keys.d/$ddnskeyname",
- require => Bind::Key[ $ddnskeyname ],
+ dnsupdatekey => "/etc/bind/keys.d/$::ddnskeyname",
+ require => Bind::Key[$::ddnskeyname],
pxeserver => '10.1.1.5',
pxefilename => 'pxelinux.0',
}
@@ -23,7 +23,7 @@
dhcp::host {
'gateway':
- mac => "00:11:22:33:44:55",
- ip => "10.1.1.1",
+ mac => '00:11:22:33:44:55',
+ ip => '10.1.1.1',
}

0 comments on commit c045bf8

Please sign in to comment.