Fixing puppet-lint errors.
This commit is contained in:
parent
2f83cb7d4a
commit
34c36045fa
59 changed files with 995 additions and 990 deletions
|
@ -2,36 +2,36 @@
|
|||
class dhcp::server::common {
|
||||
|
||||
package { "dhcp":
|
||||
name => $operatingsystem ? {
|
||||
name => $operatingsystem ? {
|
||||
Debian => "dhcp3-server",
|
||||
OpenBSD => "isc-dhcp-server",
|
||||
OpenBSD => "isc-dhcp-server",
|
||||
Ubuntu => "dhcp3-server",
|
||||
default => "dhcp",
|
||||
},
|
||||
ensure => installed,
|
||||
default => "dhcp",
|
||||
},
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
file { "dhcpd.leases":
|
||||
name => $operatingsystem ? {
|
||||
name => $operatingsystem ? {
|
||||
Debian => "/var/lib/dhcp3/dhcpd.leases",
|
||||
OpenBSD => "/var/db/dhcpd.leases",
|
||||
OpenBSD => "/var/db/dhcpd.leases",
|
||||
Ubuntu => "/var/lib/dhcp3/dhcpd.leases",
|
||||
default => "/var/lib/dhcpd/dhcpd.leases",
|
||||
},
|
||||
ensure => present,
|
||||
owner => $operatingsystem ? {
|
||||
default => "/var/lib/dhcpd/dhcpd.leases",
|
||||
},
|
||||
ensure => present,
|
||||
owner => $operatingsystem ? {
|
||||
debian => dhcpd,
|
||||
ubuntu => dhcpd,
|
||||
default => root,
|
||||
},
|
||||
group => $operatingsystem ? {
|
||||
group => $operatingsystem ? {
|
||||
Debian => dhcpd,
|
||||
OpenBSD => wheel,
|
||||
OpenBSD => wheel,
|
||||
Ubuntu => dhcpd,
|
||||
default => root,
|
||||
},
|
||||
require => Package["dhcp"],
|
||||
before => Service["dhcpd"],
|
||||
default => root,
|
||||
},
|
||||
require => Package["dhcp"],
|
||||
before => Service["dhcpd"],
|
||||
}
|
||||
|
||||
if $operatingsystem == "OpenBSD" and $operatingsystemrelease !~ /4\.[1-8]/ {
|
||||
|
@ -55,8 +55,8 @@ class dhcp::server::common {
|
|||
Ubuntu => "dhcp3-server",
|
||||
default => "dhcpd",
|
||||
},
|
||||
ensure => running,
|
||||
enable => true,
|
||||
ensure => running,
|
||||
enable => true,
|
||||
binary => $operatingsystem ? {
|
||||
OpenBSD => "/usr/local/sbin/dhcpd",
|
||||
default => undef,
|
||||
|
@ -65,7 +65,7 @@ class dhcp::server::common {
|
|||
OpenBSD => "/usr/local/sbin/dhcpd -q",
|
||||
default => undef,
|
||||
},
|
||||
require => Package["dhcp"],
|
||||
require => Package["dhcp"],
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ class dhcp::server inherits dhcp::server::common {
|
|||
},
|
||||
notify => Service["dhcpd"],
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -99,36 +99,36 @@ class dhcp::server::ldap inherits dhcp::server::common {
|
|||
include ldap::client::python
|
||||
|
||||
file { "/usr/local/sbin/dhcpdump.py":
|
||||
ensure => present,
|
||||
source => "puppet:///modules/dhcp/dhcpdump.py",
|
||||
mode => 0755,
|
||||
owner => root,
|
||||
group => $operatingsystem ? {
|
||||
OpenBSD => wheel,
|
||||
default => root,
|
||||
},
|
||||
ensure => present,
|
||||
source => "puppet:///modules/dhcp/dhcpdump.py",
|
||||
mode => 0755,
|
||||
owner => root,
|
||||
group => $operatingsystem ? {
|
||||
OpenBSD => wheel,
|
||||
default => root,
|
||||
},
|
||||
}
|
||||
|
||||
file { "/etc/dhcpd.conf.in":
|
||||
ensure => present,
|
||||
source => [ "puppet:///files/dhcp/dhcpd.conf.in.${hostname}",
|
||||
"puppet:///files/dhcp/dhcpd.conf.in", ],
|
||||
mode => 0644,
|
||||
owner => root,
|
||||
group => $operatingsystem ? {
|
||||
OpenBSD => wheel,
|
||||
default => root,
|
||||
},
|
||||
require => Package["dhcp"],
|
||||
ensure => present,
|
||||
source => [ "puppet:///files/dhcp/dhcpd.conf.in.${hostname}",
|
||||
"puppet:///files/dhcp/dhcpd.conf.in", ],
|
||||
mode => 0644,
|
||||
owner => root,
|
||||
group => $operatingsystem ? {
|
||||
OpenBSD => wheel,
|
||||
default => root,
|
||||
},
|
||||
require => Package["dhcp"],
|
||||
}
|
||||
|
||||
exec { "generate-dhcp-conf":
|
||||
path => "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin",
|
||||
command => "dhcpdump.py /etc/dhcpd.conf.in* > /etc/dhcpd.conf",
|
||||
unless => "dhcpdump.py /etc/dhcpd.conf.in* | diff /etc/dhcpd.conf -",
|
||||
require => [ File["/etc/dhcpd.conf.in"],
|
||||
File["/usr/local/sbin/dhcpdump.py"], ],
|
||||
notify => Service["dhcpd"],
|
||||
path => "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin",
|
||||
command => "dhcpdump.py /etc/dhcpd.conf.in* > /etc/dhcpd.conf",
|
||||
unless => "dhcpdump.py /etc/dhcpd.conf.in* | diff /etc/dhcpd.conf -",
|
||||
require => [ File["/etc/dhcpd.conf.in"],
|
||||
File["/usr/local/sbin/dhcpdump.py"], ],
|
||||
notify => Service["dhcpd"],
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue