Revision 57a8b959
Added by Mickaël Canévet about 9 years ago
spec/classes/puppet_config_spec.rb | ||
---|---|---|
|
||
context "on a RedHat family OS" do
|
||
let :facts do {
|
||
:concat_basedir => '/foo/bar',
|
||
:osfamily => 'RedHat',
|
||
:domain => 'example.org',
|
||
} end
|
||
... | ... | |
'class {"::puppet": listen => true}'
|
||
end
|
||
let :facts do {
|
||
:concat_basedir => '/foo/bar',
|
||
:osfamily => 'RedHat',
|
||
:fqdn => 'me.example.org',
|
||
} end
|
||
... | ... | |
end
|
||
|
||
it 'should configure puppet.conf' do
|
||
should contain_concat_fragment('puppet.conf+10-main').
|
||
should contain_concat__fragment('puppet.conf+10-main').
|
||
with_content(/^\s+disable_warnings\s+= deprecations$/).
|
||
with({}) # So we can use a trailing dot on each with_content line
|
||
end
|
||
... | ... | |
|
||
context "on a FreeBSD family OS" do
|
||
let :facts do {
|
||
:concat_basedir => '/foo/bar',
|
||
:osfamily => 'FreeBSD',
|
||
:domain => 'example.org',
|
||
} end
|
||
... | ... | |
|
||
context "on a Windows family OS" do
|
||
let :facts do {
|
||
:concat_basedir => 'C:\Temp',
|
||
:osfamily => 'windows',
|
||
:domain => 'example.org',
|
||
} end
|
||
... | ... | |
'class {"::puppet": listen => true}'
|
||
end
|
||
let :facts do {
|
||
:concat_basedir => 'C:\Temp',
|
||
:osfamily => 'windows',
|
||
:fqdn => 'me.example.org',
|
||
} end
|
Also available in: Unified diff
Use puppetlabs-concat instead of theforeman-concat_native