diff --git a/manifests/params.pp b/manifests/params.pp index f08c612..a4519e9 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -29,9 +29,9 @@ $ae_manage_user = false, $ae_user_name = 'apache', $ae_user_uid = '48', -$ae_u_comment = 'Apache Service User', +$ae_u_comment = 'Apache', $ae_u_groups = undef, -$ae_user_home = '/home/apache', +$ae_user_home = '/opt/rh/httpd24/root/usr/share/httpd', $ae_user_shell = '/bin/false', ) { diff --git a/manifests/server/user.pp b/manifests/server/user.pp index bde635c..408b826 100644 --- a/manifests/server/user.pp +++ b/manifests/server/user.pp @@ -29,10 +29,30 @@ class cd_apache::server::user ( if $ae_manage_user == true { + group { $ae_user_name: + ensure => present, + name => $ae_user_name, + gid => $ae_user_uid, + allowdupe => false, + } - - - - + user { $ae_user_name: + ensure => present, + name => $ae_user_name, + allowdupe => false, + comment => $ae_u_comment, + uid => $ae_user_uid, + gid => $ae_user_name, + groups => $ae_u_groups, + managehome => true, + home => $ae_user_home, + shell => $ae_user_shell, + require => Group[$ae_user_name], + } } + + else { + # do nothing + } + }