Merge pull request #635 from geoffgarside/create-log-files
Create directory for log files
This commit is contained in:
commit
e87bdfafda
2 changed files with 15 additions and 0 deletions
|
@ -209,6 +209,10 @@ class nginx::config(
|
|||
ensure => directory,
|
||||
}
|
||||
|
||||
file { $log_dir:
|
||||
ensure => directory,
|
||||
}
|
||||
|
||||
file {$client_body_temp_path:
|
||||
ensure => directory,
|
||||
owner => $daemon_user,
|
||||
|
|
|
@ -68,6 +68,12 @@ describe 'nginx::config' do
|
|||
it { is_expected.to contain_file("/var/nginx/proxy_temp").with(:owner => 'nginx')}
|
||||
it { is_expected.to contain_file("/etc/nginx/nginx.conf").with_content %r{^user nginx;}}
|
||||
|
||||
it { is_expected.to contain_file("/var/log/nginx").with(
|
||||
:ensure => 'directory',
|
||||
:group => 'root',
|
||||
:mode => '0644'
|
||||
)}
|
||||
|
||||
describe "nginx.conf template content" do
|
||||
[
|
||||
{
|
||||
|
@ -514,6 +520,11 @@ describe 'nginx::config' do
|
|||
'purge',
|
||||
'recurse'
|
||||
])}
|
||||
it { is_expected.to contain_file('/var/log/nginx').without([
|
||||
'ignore',
|
||||
'purge',
|
||||
'recurse'
|
||||
])}
|
||||
end
|
||||
|
||||
context "when daemon_user = www-data" do
|
||||
|
|
Loading…
Reference in a new issue