From a882317f4feb02e85ca9b9543c9df6e75b18b9b4 Mon Sep 17 00:00:00 2001 From: Mike Pirog Date: Mon, 15 Oct 2012 14:56:55 -0700 Subject: [PATCH] auto add kalauser to www-data --- modules/nginx/manifests/config.pp | 17 +++++++++++++++++ modules/nginx/manifests/init.pp | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 modules/nginx/manifests/config.pp 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