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

Change "provider" in keepalived::service for Debian Jessie #85

Open
flaf opened this issue Nov 29, 2015 · 0 comments
Open

Change "provider" in keepalived::service for Debian Jessie #85

flaf opened this issue Nov 29, 2015 · 0 comments

Comments

@flaf
Copy link

flaf commented Nov 29, 2015

Hi,

For a "service" resource, the default value of the "provider" attribute is "systemd" in Debian Jessie but it's not correct for the specific case of Keepalived service which uses a init.d script. Currently after each run on Debian Jessie, we have:

Notice: /Stage[main]/Keepalived::Service/Service[keepalived]/enable: enable changed 'false' to 'true'

in this file https://github.com/arioch/puppet-keepalived/blob/master/manifests/service.pp, could it be possible to have something like that:

# == Class keepalived
#
class keepalived::service {

  if $::lsbdistcodename == 'jessie' {
    $provider = 'debian' # to be able to enable init.d script with update-rc.d
  }

  if $::keepalived::service_manage == true {
    service { $::keepalived::service_name:
      ensure     => $::keepalived::service_ensure,
      enable     => $::keepalived::service_enable,
      hasrestart => $::keepalived::service_hasrestart,
      hasstatus  => $::keepalived::service_hasstatus,
      require    => Class['::keepalived::config'],
      restart    => $::keepalived::service_restart,
      provider   => $provider,
    }
  }
}

Regards
François Lafont

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant