Skip to content
Snippets Groups Projects
Commit b54c8779 authored by Fabien Combernous's avatar Fabien Combernous
Browse files

Merge branch '8-manage_user-and-dependencies' into 'main'

Resolve "manage_user and dependencies"

Closes #8

See merge request !8
parents ad98d110 59af2843
No related branches found
No related tags found
1 merge request!8Resolve "manage_user and dependencies"
Pipeline #88646 canceled
......@@ -82,6 +82,11 @@ class sympa (
},
},
}
Class['accounts'] -> File["${sympa::prefix_path}/sympa"]
Class['accounts'] -> Exec['autoreconf']
Class['accounts'] -> Exec['configure']
Class['accounts'] -> Exec['make']
}
if $sympa::manage_database {
include postgresql::server
......@@ -109,10 +114,9 @@ class sympa (
cleanup => true,
}
-> file { "${sympa::prefix_path}/sympa":
ensure => link,
owner => $user,
target => "${sympa::prefix_path}/sympa-${sympa::release}",
require => Class[accounts],
ensure => link,
owner => $user,
target => "${sympa::prefix_path}/sympa-${sympa::release}",
}
-> package { $_required:
ensure => present,
......@@ -139,7 +143,6 @@ class sympa (
environment => ["HOME=${sympa::prefix_path}"],
user => $sympa::user,
creates => "${sympa::prefix_path}/sympa-${sympa::release}/configure",
require => Class[accounts],
}
-> exec { 'configure':
command => "/usr/bin/make distclean; ${sympa::prefix_path}/sympa/configure ${_configure_opts}",
......@@ -148,7 +151,6 @@ class sympa (
environment => ["HOME=${sympa::prefix_path}"],
user => $sympa::user,
creates => "${sympa::prefix_path}/sympa-${sympa::release}/config.status",
require => Class[accounts],
}
~> exec { 'make':
command => '/usr/bin/make',
......@@ -156,7 +158,6 @@ class sympa (
environment => ["HOME=${sympa::prefix_path}"],
user => $sympa::user,
creates => "${sympa::prefix_path}/sympa-${sympa::release}/service/logrotate",
require => Class[accounts],
}
~> exec { 'make install':
command => '/usr/bin/make install',
......
......@@ -8,6 +8,26 @@ describe 'sympa' do
let(:facts) { os_facts }
it { is_expected.to compile.with_all_deps }
context 'with manage_user false' do
let(:params) do
{
manage_user: false,
}
end
it { is_expected.to compile.with_all_deps }
end
context 'with manage_database false' do
let(:params) do
{
manage_database: false,
}
end
it { is_expected.to compile.with_all_deps }
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment