Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Management of $confdir shoudl be skipped if is /etc #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions manifests/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,22 @@

# The config file could be /etc so we do not want the service user to be the
# owner. Plus Maxscale don't need to write in it, just need the rights on the
# config file
ensure_resource( 'file', $confdir, {
ensure => directory,
})
# config file.
# Skip management of $confdir if is /etc as not to conflict with other modules.
if ($confdir != '/etc') {
ensure_resource( 'file', $confdir, {
ensure => directory,
before => File[$configfile],
})
}

file { $configfile:
ensure => present,
content => template('maxscale/maxscale.cnf.erb'),
owner => $svcuser,
group => $svcgroup,
mode => '0644',
require => [ Class['maxscale::install'], File[$confdir], ],
require => Class['maxscale::install'],
}

if $master_ini['content'] != undef and $master_ini['directory'] != undef {
Expand Down