Skip to content

A puppet module for installing and configuring needrestart

Notifications You must be signed in to change notification settings

vorlon/hetzner-needrestart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

needrestart puppet module

Table of Contents

  1. Description
  2. Setup
  3. Usage
  4. Parameters
  5. Limitations

Description

Restarts needed services automatically. Installs package, configures mode (list, automatic, interactive). Adds groups of services to ignore list.

Setup

What needrestart affects

Once installed, needrestart hooks into package management and init systems. For example, upgrading openssl via apt will restart exim and apache if they have proper init scripts.

Usage

To automatically restart everything except bareos-fd, mysql, exim4, dovecot and apache2 if needed:

class { 'needrestart':
  action      => 'automatic',
  ignorelist  => {'Backups'    => ['bareos-fd'],
                  'Databases'  => ['mysql'],
                  'Mail'       => ['exim4','dovecot'],
                  'Webservers' => ['apache2']},
  }
}

Another hiera example:

---
classes:
  - needrestart

needrestart::action: 'interactive'
needrestart::disable_kernel_hints: false
needrestart::notify_user_obsolete_binaries: true
needrestart::preferred_ui: 'debconf'
needrestart::ignorelist:
  'Virtualization':
    - 'libvirt-bin'
  'Applications'
    - 'tomcat8'

Parameters

action

String to specify default action. Possible values are:

  • list (default)
  • interactive
  • automatic

preferred_ui

String to set preferred ui. Possible values are:

  • stdio (default)
  • debconf.

ignorelist

See example in usage above.

disable_kernel_hints

Boolean to specify if hints on pending kernel upgrades are hidden or not. Possible values are:

  • true (default)
  • false

notify_user_obsolete_binaries

Boolean to specify if a user is notified about obsolete binaries in his session or not. Possible values are:

  • true (default)
  • false

package_ensure

String for ensure parameter to the needrestart package. Default value is "installed".

package_name

String to specify the package name. Default value is "needrestart".

Limitations

Only tested on Debian 7.0 and Ubuntu >= 14.04

About

A puppet module for installing and configuring needrestart

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 61.4%
  • Puppet 35.2%
  • Ruby 3.4%