Configure $config_user, $config_group
This commit is contained in:
parent
a5b6188f3f
commit
ceda2c941a
3 changed files with 25 additions and 4 deletions
|
@ -1,6 +1,20 @@
|
||||||
# == Class icingaweb2::config
|
# == Class icingaweb2::config
|
||||||
#
|
#
|
||||||
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 {
|
File {
|
||||||
require => Class['::icingaweb2::install'],
|
require => Class['::icingaweb2::install'],
|
||||||
owner => $::icingaweb2::config_user,
|
owner => $::icingaweb2::config_user,
|
||||||
|
|
|
@ -30,8 +30,8 @@ class icingaweb2::params {
|
||||||
$config_dir_mode = '0755'
|
$config_dir_mode = '0755'
|
||||||
$config_dir_recurse = false
|
$config_dir_recurse = false
|
||||||
$config_file_mode = '0644'
|
$config_file_mode = '0644'
|
||||||
$config_group = 'root'
|
$config_group = 'icingaweb2'
|
||||||
$config_user = 'root'
|
$config_user = 'icingaweb2'
|
||||||
$pkg_deps = []
|
$pkg_deps = []
|
||||||
$pkg_ensure = present
|
$pkg_ensure = present
|
||||||
$pkg_list = []
|
$pkg_list = []
|
||||||
|
@ -43,8 +43,8 @@ class icingaweb2::params {
|
||||||
$config_dir_mode = '0755'
|
$config_dir_mode = '0755'
|
||||||
$config_dir_recurse = false
|
$config_dir_recurse = false
|
||||||
$config_file_mode = '0644'
|
$config_file_mode = '0644'
|
||||||
$config_group = 'root'
|
$config_group = 'icingaweb2'
|
||||||
$config_user = 'root'
|
$config_user = 'icingaweb2'
|
||||||
$pkg_deps = []
|
$pkg_deps = []
|
||||||
$pkg_ensure = present
|
$pkg_ensure = present
|
||||||
$pkg_list = []
|
$pkg_list = []
|
||||||
|
|
|
@ -9,6 +9,10 @@ describe 'icingaweb2', :type => :class do
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let :pre_condition do
|
||||||
|
'User <| |>'
|
||||||
|
end
|
||||||
|
|
||||||
describe 'it compiles? shipt it!', :all do
|
describe 'it compiles? shipt it!', :all do
|
||||||
it { should compile }
|
it { should compile }
|
||||||
it { should compile.with_all_deps }
|
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/resources.ini') }
|
||||||
it { should contain_file('/etc/icingaweb2/roles.ini') }
|
it { should contain_file('/etc/icingaweb2/roles.ini') }
|
||||||
it { should contain_file('/usr/share/icingaweb2') }
|
it { should contain_file('/usr/share/icingaweb2') }
|
||||||
|
|
||||||
|
it { should contain_group('icingaweb2') }
|
||||||
|
it { should contain_user('icingaweb2') }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'with parameter: config_dir' do
|
describe 'with parameter: config_dir' do
|
||||||
|
|
Loading…
Reference in a new issue