Merge pull request #635 from geoffgarside/create-log-files

Create directory for log files
This commit is contained in:
Matthew Haughton 2015-06-03 22:51:17 -04:00
commit e87bdfafda
2 changed files with 15 additions and 0 deletions

View file

@ -209,6 +209,10 @@ class nginx::config(
ensure => directory,
}
file { $log_dir:
ensure => directory,
}
file {$client_body_temp_path:
ensure => directory,
owner => $daemon_user,

View file

@ -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