diff --git a/abusesa/manifests/services.pp b/abusesa/manifests/services.pp index 1109d16..1c4498f 100644 --- a/abusesa/manifests/services.pp +++ b/abusesa/manifests/services.pp @@ -19,10 +19,12 @@ class abusesa::services( ], } + include nginx + exec { 'usermod-nginx-abuserv': path => '/bin:/usr/bin:/sbin:/usr/sbin', - command => 'usermod -a -G abuserv nginx', - unless => 'id -n -G nginx | grep \'\babuserv\b\'', + command => "usermod -a -G abuserv ${nginx::user}", + unless => "id -n -G ${nginx::user} | grep '\\babuserv\\b'", require => [ Class['nginx'], Group['abuserv'], @@ -47,7 +49,6 @@ class abusesa::services( content => "umask 007\n", } - include nginx nginx::config { 'abusesa.conf': content => template('abusesa/services/nginx.conf.erb'), } diff --git a/nginx/manifests/init.pp b/nginx/manifests/init.pp index a80280e..125e083 100644 --- a/nginx/manifests/init.pp +++ b/nginx/manifests/init.pp @@ -15,6 +15,11 @@ class nginx( } $logdir = '/var/www/logs' } + 'ubuntu': { + $user = 'www-data' + $group = 'www-data' + $logdir = '/var/log/nginx' + } default: { $user = 'nginx' $group = 'nginx'