First draft of chroot implementation for Debian
- RHEL chroot code has been moved into a bind::chroot::package class - Debian family (and probably other families) can use the `bind::chroot::manual` class to enable chroot for bind using the method described here: https://wiki.debian.org/Bind9#Bind_Chroot
This commit is contained in:
committed by
Cedric DEFORTIS
parent
bcaafc05e1
commit
44bb1b0e0e
@@ -0,0 +1,16 @@
|
||||
# ex: syntax=ruby ts=2 sw=2 si et
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'bind::chroot::manual' do
|
||||
on_supported_os.each do |os, facts|
|
||||
context "on #{os}" do
|
||||
# Only applies to Debian Family for now:
|
||||
next unless facts[:os]['family'] == 'Debian'
|
||||
let (:facts) {facts}
|
||||
context "with defaults parameters" do
|
||||
it { is_expected.to compile.with_all_deps }
|
||||
it { is_expected.to contain_class('bind::defaults') }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,31 @@
|
||||
# ex: syntax=ruby ts=2 sw=2 si et
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'bind::chroot::package' do
|
||||
on_supported_os.each do |os, facts|
|
||||
context "on #{os}" do
|
||||
# Only applies to RedHat Family for now:
|
||||
next unless facts[:os]['family'] == 'RedHat'
|
||||
let (:facts) {facts}
|
||||
context "with defaults parameters" do
|
||||
it { is_expected.to compile.with_all_deps }
|
||||
it { is_expected.to contain_class('bind::defaults') }
|
||||
it { is_expected.to contain_package('bind-chroot').with({ ensure: 'latest', }) }
|
||||
it do
|
||||
is_expected.to contain_service('bind-without-chroot').with({
|
||||
ensure: 'stopped',
|
||||
enable: false,
|
||||
name: 'named'
|
||||
})
|
||||
end
|
||||
it do
|
||||
is_expected.to contain_service('bind').with({
|
||||
ensure: 'running',
|
||||
enable: true,
|
||||
name: 'named-chroot'
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user