Fix lint warnings
This commit is contained in:
parent
5870f37f27
commit
a0b6e70c19
@ -1,4 +1,4 @@
|
|||||||
class { 'bind':
|
class { '::bind':
|
||||||
chroot => true,
|
chroot => true,
|
||||||
# Note: this file MUST be into the /etc/named directory so the
|
# Note: this file MUST be into the /etc/named directory so the
|
||||||
# RHEL7 specific setup-named-chroot.sh script will make it available into
|
# RHEL7 specific setup-named-chroot.sh script will make it available into
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
|
# Chroot class for distribution without specific packaging
|
||||||
class bind::chroot::manual(
|
class bind::chroot::manual(
|
||||||
$chroot_dir = $::bind::defaults::chroot_dir,
|
$chroot_dir = $::bind::defaults::chroot_dir,
|
||||||
) inherits bind::defaults {
|
) inherits bind::defaults {
|
||||||
exec { 'mkdir-p-$chroot_dir':
|
exec { 'mkdir-p-$chroot_dir':
|
||||||
command => "mkdir -p ${::bind::defaults::chroot_dir}",
|
command => "mkdir -p ${::bind::defaults::chroot_dir}",
|
||||||
path => ['/bin', '/usr/bin'],
|
path => ['/bin', '/usr/bin'],
|
||||||
creates => "${::bind::defaults::chroot_dir}",
|
creates => $::bind::defaults::chroot_dir,
|
||||||
}
|
}
|
||||||
# Creating system dirs under chroot dir:
|
# Creating system dirs under chroot dir:
|
||||||
file { ["${::bind::defaults::chroot_dir}",
|
file { [$::bind::defaults::chroot_dir,
|
||||||
"${::bind::defaults::chroot_dir}/etc",
|
"${::bind::defaults::chroot_dir}/etc",
|
||||||
"${::bind::defaults::chroot_dir}/dev",
|
"${::bind::defaults::chroot_dir}/dev",
|
||||||
"${::bind::defaults::chroot_dir}/var",
|
"${::bind::defaults::chroot_dir}/var",
|
||||||
@ -20,9 +21,9 @@ class bind::chroot::manual(
|
|||||||
|
|
||||||
file { ["${::bind::defaults::chroot_dir}/var/cache/bind",
|
file { ["${::bind::defaults::chroot_dir}/var/cache/bind",
|
||||||
"${::bind::defaults::chroot_dir}/var/run/named"]:
|
"${::bind::defaults::chroot_dir}/var/run/named"]:
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
mode => '0775',
|
mode => '0775',
|
||||||
group => $::bind::defaults::bind_group,
|
group => $::bind::defaults::bind_group,
|
||||||
require => Exec['mkdir-p-$chroot_dir'],
|
require => Exec['mkdir-p-$chroot_dir'],
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,8 +43,8 @@ class bind::chroot::manual(
|
|||||||
creates => "${::bind::defaults::chroot_dir}/dev/urandom",
|
creates => "${::bind::defaults::chroot_dir}/dev/urandom",
|
||||||
}
|
}
|
||||||
file { [ "${::bind::defaults::chroot_dir}/dev/null",
|
file { [ "${::bind::defaults::chroot_dir}/dev/null",
|
||||||
"${::bind::defaults::chroot_dir}/dev/random",
|
"${::bind::defaults::chroot_dir}/dev/random",
|
||||||
"${::bind::defaults::chroot_dir}/dev/urandom"]:
|
"${::bind::defaults::chroot_dir}/dev/urandom"]:
|
||||||
mode => '0660',
|
mode => '0660',
|
||||||
require => [ Exec['mknod-dev-null'], Exec['mknod-dev-random'], Exec['mknod-dev-urandom'] ],
|
require => [ Exec['mknod-dev-null'], Exec['mknod-dev-random'], Exec['mknod-dev-urandom'] ],
|
||||||
}
|
}
|
||||||
@ -54,7 +55,7 @@ class bind::chroot::manual(
|
|||||||
require => [ Package['bind'], File["${::bind::defaults::chroot_dir}/etc"] ],
|
require => [ Package['bind'], File["${::bind::defaults::chroot_dir}/etc"] ],
|
||||||
}
|
}
|
||||||
-> file { '/etc/bind':
|
-> file { '/etc/bind':
|
||||||
ensure => link,
|
ensure => link,
|
||||||
target => "${::bind::defaults::chroot_dir}${::bind::defaults::confdir}",
|
target => "${::bind::defaults::chroot_dir}${::bind::defaults::confdir}",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# Chroot class for distribution using dedicated package
|
||||||
class bind::chroot::package(
|
class bind::chroot::package(
|
||||||
$chroot_dir = $::bind::defaults::chroot_dir,
|
$chroot_dir = $::bind::defaults::chroot_dir,
|
||||||
) inherits bind::defaults {
|
) inherits bind::defaults {
|
||||||
|
|||||||
@ -19,7 +19,7 @@ class bind (
|
|||||||
# especially when not using hiera (i.e. when using Foreman as ENC):
|
# especially when not using hiera (i.e. when using Foreman as ENC):
|
||||||
$default_zones_include = $::bind::defaults::default_zones_include,
|
$default_zones_include = $::bind::defaults::default_zones_include,
|
||||||
) inherits bind::defaults {
|
) inherits bind::defaults {
|
||||||
if $chroot and !$chroot_supported {
|
if $chroot and !$::bind::defaults::chroot_supported {
|
||||||
fail('Chroot for bind is not supported on your OS')
|
fail('Chroot for bind is not supported on your OS')
|
||||||
}
|
}
|
||||||
File {
|
File {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user