Configure $config_user, $config_group

This commit is contained in:
Tom De Vylder 2015-02-20 13:08:43 +01:00
parent a5b6188f3f
commit ceda2c941a
3 changed files with 25 additions and 4 deletions

View file

@ -1,6 +1,20 @@
# == Class icingaweb2::config
#
class icingaweb2::config {
@user { 'icingaweb2':
ensure => present,
home => $::icingaweb2::web_root,
managehome => true,
}
@group { 'icingaweb2':
ensure => present,
system => true,
}
realize(User['icingaweb2'])
realize(Group['icingaweb2'])
File {
require => Class['::icingaweb2::install'],
owner => $::icingaweb2::config_user,

View file

@ -30,8 +30,8 @@ class icingaweb2::params {
$config_dir_mode = '0755'
$config_dir_recurse = false
$config_file_mode = '0644'
$config_group = 'root'
$config_user = 'root'
$config_group = 'icingaweb2'
$config_user = 'icingaweb2'
$pkg_deps = []
$pkg_ensure = present
$pkg_list = []
@ -43,8 +43,8 @@ class icingaweb2::params {
$config_dir_mode = '0755'
$config_dir_recurse = false
$config_file_mode = '0644'
$config_group = 'root'
$config_user = 'root'
$config_group = 'icingaweb2'
$config_user = 'icingaweb2'
$pkg_deps = []
$pkg_ensure = present
$pkg_list = []

View file

@ -9,6 +9,10 @@ describe 'icingaweb2', :type => :class do
}
}
let :pre_condition do
'User <| |>'
end
describe 'it compiles? shipt it!', :all do
it { should compile }
it { should compile.with_all_deps }
@ -29,6 +33,9 @@ describe 'icingaweb2', :type => :class do
it { should contain_file('/etc/icingaweb2/resources.ini') }
it { should contain_file('/etc/icingaweb2/roles.ini') }
it { should contain_file('/usr/share/icingaweb2') }
it { should contain_group('icingaweb2') }
it { should contain_user('icingaweb2') }
end
describe 'with parameter: config_dir' do