fix(freebsd): fix default
suite implementation and tests
This commit is contained in:
parent
e7c2d20f06
commit
0a0f69ee2f
@ -1,3 +1,7 @@
|
|||||||
|
#
|
||||||
|
# This file is managed by Salt! Do not edit by hand!
|
||||||
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
# This is the main Apache HTTP server configuration file. It contains the
|
# This is the main Apache HTTP server configuration file. It contains the
|
||||||
# configuration directives that give the server its instructions.
|
# configuration directives that give the server its instructions.
|
||||||
|
@ -202,7 +202,9 @@ FreeBSD:
|
|||||||
confext: ''
|
confext: ''
|
||||||
default_site: default
|
default_site: default
|
||||||
default_site_ssl: default-ssl
|
default_site_ssl: default-ssl
|
||||||
|
moddir: /usr/local/etc/apache24/modules.d
|
||||||
logdir: /var/log/
|
logdir: /var/log/
|
||||||
|
logrotatedir: /usr/local/etc/logrotate.d/apache2
|
||||||
wwwdir: /usr/local/www/apache24/
|
wwwdir: /usr/local/www/apache24/
|
||||||
|
|
||||||
OpenBSD:
|
OpenBSD:
|
||||||
|
@ -28,9 +28,11 @@ control 'apache configuration' do
|
|||||||
sitesdir = '/etc/httpd/sites-enabled'
|
sitesdir = '/etc/httpd/sites-enabled'
|
||||||
when 'bsd'
|
when 'bsd'
|
||||||
vhostdir = '/usr/local/etc/apache24/Includes'
|
vhostdir = '/usr/local/etc/apache24/Includes'
|
||||||
# logrotatedir = ?
|
logrotatedir = '/usr/local/etc/logrotate.d/apache2'
|
||||||
# moddir = '?'
|
moddir = '/usr/local/etc/apache24/modules.d'
|
||||||
# sitesdir = '?'
|
# https://docs.freebsd.org/en/books/handbook/network-servers/#_virtual_hosting
|
||||||
|
# All done under `/usr/local/etc/apache24/httpd.conf`
|
||||||
|
sitesdir = '/usr/local/etc/apache24'
|
||||||
end
|
end
|
||||||
describe file(vhostdir) do
|
describe file(vhostdir) do
|
||||||
it { should exist }
|
it { should exist }
|
||||||
@ -56,6 +58,7 @@ end
|
|||||||
control 'apache configuration (unique)' do
|
control 'apache configuration (unique)' do
|
||||||
title 'should be valid'
|
title 'should be valid'
|
||||||
|
|
||||||
|
config_file_group = 'root'
|
||||||
case platform[:family]
|
case platform[:family]
|
||||||
when 'debian'
|
when 'debian'
|
||||||
config_file = '/etc/apache2/apache2.conf'
|
config_file = '/etc/apache2/apache2.conf'
|
||||||
@ -74,11 +77,12 @@ control 'apache configuration (unique)' do
|
|||||||
wwwdir = '/srv/http'
|
wwwdir = '/srv/http'
|
||||||
when 'bsd'
|
when 'bsd'
|
||||||
config_file = '/usr/local/etc/apache24/httpd.conf'
|
config_file = '/usr/local/etc/apache24/httpd.conf'
|
||||||
|
config_file_group = 'wheel'
|
||||||
wwwdir = '/usr/local/www/apache24/'
|
wwwdir = '/usr/local/www/apache24/'
|
||||||
end
|
end
|
||||||
describe file(config_file) do
|
describe file(config_file) do
|
||||||
it { should be_file }
|
it { should be_file }
|
||||||
it { should be_grouped_into 'root' }
|
it { should be_grouped_into config_file_group }
|
||||||
its('mode') { should cmp '0644' }
|
its('mode') { should cmp '0644' }
|
||||||
its('content') do
|
its('content') do
|
||||||
should include(
|
should include(
|
||||||
|
Loading…
Reference in New Issue
Block a user