GithubHelp home page GithubHelp logo

unibonn / puppet-unattended_upgrades Goto Github PK

View Code? Open in Web Editor NEW

This project forked from voxpupuli/puppet-unattended_upgrades

0.0 5.0 1.0 351 KB

Unattended-upgrades for APT

License: Other

Ruby 55.45% Puppet 21.83% HTML 21.36% Dockerfile 1.36%

puppet-unattended_upgrades's Introduction

Unattended Upgrades module for Puppet

Build Status Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores

Table of Contents

  1. Overview
  2. Module Description
  3. Setup
  4. Usage
  5. Reference
  6. Limitations - OS compatibility, etc.
  7. License

Overview

The unattended_upgrades module allows for the installation and configuration of automatic security (and other) updates through apt.

This functionality used to be part of the puppetlabs-apt module but was split off into its own module.

Module Description

The unattended_upgrades module automates the configuration of apt package updates.

Setup

What unattended_upgrades affects

  • Package/configuration for unattended_upgrades

Beginning with unattended_upgrades

All you need to do is include the apt module, include apt, and this module, include unattended_upgrades for it to work.

This module relies on the apt module and will not work without it.

Usage

Using unattended_upgrades simply consists of including the module and if needed altering some of the default settings.

Reference

Classes

  • unattended_upgrades: Main class, installs the necessary packages and writes the configuration.

Parameters

unattended_upgrades

  • age ({}): A hash of settings with two possible keys:

    • min (2): Minimum age of a cache package file. File younger than min will not be deleted.
    • max (0): Maximum allowed age of a cache package file. File older than max will be deleted.

    Any of these keys can be specified and will be merged into the defaults:

    class { 'unattended_upgrades':
      age => { 'max' => 10 },
    }
  • auto ({}): A hash of settings with these possible keys:

    • clean(0): Remove packages that can no longer be downloaded from cache every X days (0 = disabled).
    • fix_interrupted_dpkg(true): Try to fix package installation state.
    • reboot(false): Reboot system after package update installation.
    • reboot_time(now): If automatic reboot is enabled and needed, reboot at the specific time (instead of immediately). Expects a string in the format "HH:MM", using the 24 hour clock with leading zeros. Examples: "16:37" for 37 minutes past 4PM, or "02:03" for 3 minutes past 2AM.
    • remove(true): Remove unneeded dependencies after update installation.

    Any of these keys can be specified and will be merged into the defaults:

    class { 'unattended_upgrades':
      auto => { 'reboot' => true },
    }
  • backup ({}): A hash with two possible keys:

    • archive_interval (0): Backup after n-days if archive contents changed.
    • level (3): Backup level.

    Any of these keys can be specified and will be merged into the defaults:

    class { 'unattended_upgrades':
      backup => { 'level' => 5 },
    }
  • blacklist([]): A list of packages to not automatically upgrade.

  • dl_limit(undef): Use a bandwidth limit for downloading, specified in kb/sec.

  • enable (1): Enable the automatic installation of updates.

  • install_on_shutdown (false): Install updates on shutdown instead of in the background.

  • legacy_origin (true for Debian (squeeze), Ubuntu (precise, trusty, xenial, bionic and default), false for Debian (wheezy and default)): Use the legacy Unattended-Upgrade::Allowed-Origins setting or the modern Unattended-Upgrade::Origins-Pattern.

  • mail: A hash to configure email behaviour with the following possible keys:

    • report (undef): Possible values are "always", "only-on-error" or "on-change". Defaults to "on-change". Note that "never" is achieved by not setting any to address.
    • only_on_error (true): Only send mail when something went wrong. Deprecated in unattended-upgrades 1.13 and newer in favor of report.
    • to (undef): Email address to send email too

    If the default for to is kept you will not receive any mail at all. You'll likely want to set this parameter.

    Any of these keys can be specified and will be merged into the defaults:

    class { 'unattended_upgrades':
      mail => { 'to' => '[email protected]', },
    }
  • minimal_steps (true): Split the upgrade process into sections to allow shutdown during upgrade.

  • origins: The repositories from which to automatically upgrade included packages.

  • extra_origins: Additional repositories from which upgrades should be included. Can be used, if the default origins should be kept.

  • package_ensure (installed): The ensure state for the 'unattended-upgrades' package.

  • random_sleep (undef): Maximum amount of time (in seconds) that the apt cron job can sleep before the execution. The exact amount of time will be random but up to the value specified. The purpose is to avoid that servers/mirrors get hammered at exactly the same time when a lot of machines are switched on, e.g. 9:00 in the morning. Note: If this is left unset, the default value in the apt cron job applies, which is 1800 seconds.

  • size (0): Maximum size of the cache in MB.

  • update (1): Do "apt-get update" automatically every n-days.

  • upgrade (1): Run the "unattended-upgrade" security upgrade script every n-days.

  • days ([]): Set the days of the week that updates should be applied. The days can be specified as localized abbreviated or full names. Or as integers where "0" is Sunday, "1" is Monday etc.

  • upgradeable_packages ({}): A hash with two possible keys:

    • download_only (0): Do "apt-get upgrade --download-only" every n-days.
    • debdelta (1): Use debdelta-upgrade to download updates if available.

    Any of these keys can be specified and will be merged into the defaults:

    class { 'unattended_upgrades':
      upgradeable_packages => { 'debdelta' => 1, },
    }
  • verbose (0): Send report mail to root.

  • options ({}): A hash of settings with these possible keys:

    • force_confdef (true) : Use the default option for new config files if one is available, don't prompt. If no default can be found, you will be prompted unless one of the confold or confnew options is also given
    • force_confold (true): Always use the old config files, don't prompt
    • force_confnew (false): Always use the new config files, don't prompt
    • force_confmiss (false): Always install missing config files
  • remove_new_unused_deps (undef): Automatic removal of newly unused dependencies after the upgrade.

  • remove_unused_kernel (undef): Remove unused automatically installed kernel-related packages.

  • syslog_enable (undef): Enable logging to syslog. Default is False.

  • syslog_facility (undef): Specify syslog facility. Default is daemon.

Limitations

This module should work across all versions of Debian, Ubuntu, and Linux Mint.

License

The original code for this module comes from Evolving Web and was licensed under the MIT license. Code added since the fork of that module into puppetlabs-apt is covered under the Apache License version 2 as is any code added since it was split off into this separate unattended_upgrades module.

The LICENSE contains both licenses.

puppet-unattended_upgrades's People

Contributors

bastelfreak avatar daenney avatar dhoppe avatar ekohl avatar raoulbhatia avatar igalic avatar alexjfisher avatar jyaworski avatar kenyon avatar rnelson0 avatar fetzerms avatar pkkm avatar deubert-it avatar ghoneycutt avatar clauded avatar larserikp avatar petems avatar nibalizer avatar juniorsysadmin avatar fbarbeira avatar yastupin avatar gfa avatar mcanevet avatar bbriggs avatar dan33l avatar llowder avatar mpdude avatar ostavnaas avatar thepro101 avatar raphink avatar

Watchers

Oliver Freyermuth avatar Oliver Cordes avatar James Cloos avatar Ole Marggraf avatar Peter Wienemann avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.