diff --git a/modules/nginx/manifests/config.pp b/modules/nginx/manifests/config.pp new file mode 100644 index 0000000..6d79aac --- /dev/null +++ b/modules/nginx/manifests/config.pp @@ -0,0 +1,17 @@ +/** + * + * add kala_user to www-data + * + */ +class nginx::config { + + # add kalauser to www-data group + exec { "www-data": + path => "/bin:/usr/bin", + unless => "id ${::kala_user} | grep www-data", + command => "sudo usermod -g www-data ${::kala_user}", + require => Class["nginx::install"], + notify => Class["nginx::service"], + } + +} \ No newline at end of file diff --git a/modules/nginx/manifests/init.pp b/modules/nginx/manifests/init.pp index 26942c4..4e51f4e 100644 --- a/modules/nginx/manifests/init.pp +++ b/modules/nginx/manifests/init.pp @@ -5,6 +5,6 @@ */ class nginx { - include nginx::install, nginx::service + include nginx::install, nginx::config, nginx::service } \ No newline at end of file