GithubHelp home page GithubHelp logo

voxpupuli / puppet-windows_autoupdate Goto Github PK

View Code? Open in Web Editor NEW
3.0 36.0 12.0 179 KB

Puppet module to manage Windows AutoUpdate

Home Page: https://forge.puppet.com/puppet/windows_autoupdate

License: MIT License

Ruby 54.31% Puppet 41.37% Dockerfile 4.32%
puppet windows-puppet-module hacktoberfest

puppet-windows_autoupdate's Introduction

This module is deprecated. Do not use it anymore

Windows Automatic Updates module for Puppet

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

Table of Contents

  1. Overview
  2. Module Description - What is the windows_autoupdate module?
  3. Setup - The basics of getting started with windows_autoupdate
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

Puppet module for managing Microsoft Windows Automatic Updates.

Build Status

Module Description

This module configures all the relevant windows registry keys used to manage windows automatic update settings on your windows machine.

Setup

What autoupdates affects

  • Configures registry keys/values

Beginning with autoupdate

Manage autoupdates with default settings:

   include windows_autoupdate

Disable auto updates:

   class { 'windows_autoupdate': noAutoUpdate => '1' }

Usage

Classes and Defined Types

Class: windows_autoupdate

The autoupdate module primary classes, windows_autoupdate, configures all the registry settings required to manage auto updates.

Parameters within windows_autoupdates:

no_auto_update
  • 0 - Enable Automatic Updates (Default)
  • 1 - Disable Automatic Updates
au_options
  • 2 - Notify for download and notify for install
  • 3 - Auto download and notify for install
  • 4 - Auto download and schedule the install
scheduled_install_day
  • 0 - Install every day
  • 1 to 7 - Install on specific day of the week from Sunday (1) to Saturday (7).
scheduled_install_time
  • 0 to 23 - Install time of day in 24-hour format
use_wuserver
  • 1 to use custom update server
reschedule_wait_time
  • The number of minutes to wait after service start time before performing the installation.
no_auto_reboot_with_logged_on_users
  • 1 to prevent automatic reboot while users are logged on.

Reference

Classes

Public Classes

Limitations

This module is tested on the following platforms:

  • Windows 2008 R2

It is tested with the OSS version of Puppet only.

Development

Contributing

Please read CONTRIBUTING.md for full details on contributing to this project.

puppet-windows_autoupdate's People

Contributors

alexjfisher avatar bastelfreak avatar bbriggs avatar dhoppe avatar ekohl avatar ghoneycutt avatar igalic avatar juniorsysadmin avatar jyaworski avatar kupuguy avatar liamjbennett avatar llowder avatar nibalizer avatar sandra-thieme avatar smortex avatar tragiccode avatar vinzent avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-windows_autoupdate's Issues

[Feature Request] Add ability to hide updates.

I tend to hide the Skype and Silverlight installs in WU to make it easier to check and see that there are no updates available. It would be nice to automate this with Puppet.

Found some PowerShell scripting here that does this.

Deprecation of this module in favor of puppetlabs-wsus_client

Comparing this module to https://github.com/puppetlabs/puppetlabs-wsus_client it looks like we should deprecate this module. The reasons are listed below:

Why we should deprecate this

  1. wsus_client module is essentially a superset of this module in that it contains all + more of this module.
  2. wsus_client module is puppet supported module and has some nice tests and support around it.

Things to happen before the deprecation
Before the deprecation happens though the wsus_client should have the following done:

  • Create a ticket in puppetlabs jira
  • Update the documentation on the wsus_client module to indicate how a user without a wsus server can get the windows update agent to pull updates directly from "Microsoft Update".

Source
Below is the msdn documentation that states that setting UseWUServer to 0 will pull updates directly from Microsoft Update.
https://msdn.microsoft.com/en-us/library/dd939844(v=ws.10).aspx

Invalid resource type registry_key at /etc/puppet/modules/windows_autoupdate/manifests/init.pp:32

I'm getting the following error when I try to enable the firewall

class { 'windows_autoupdate': noAutoUpdate => '1' }

Here's a list of the modules and Puppet versions.

joshcooper-powershell (v0.0.4)
liamjbennett-dotnet (v0.0.2)
liamjbennett-win_facts (v0.0.2)
liamjbennett-windows_autoupdate (v0.0.2)
liamjbennett-windows_firewall (v0.0.3)

facter-1.7.4-1.el6.x86_64
hiera-1.3.1-1.el6.noarch
puppet-3.4.2-1.el6.noarch
puppetlabs-release-6-10.noarch
puppet-server-3.4.2-1.el6.noarch

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type registry_value at /etc/puppet/modules/windows_autoupdate/manifests/init.pp:32 on node puppet-tester2
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Fails on Windows 2008 R2 x64

When I execute command class { 'windows_autoupdate': noAutoUpdate => '1' } with elevated permission on Windows 2008 R2 x64 it fails with error:

Warning: Unrecognised escape sequence '\N' in file C:/ProgramData/PuppetLabs/puppet/etc/modules/windows_autoupdate/manif
ests/init.pp at line 36
Warning: Unrecognised escape sequence '\A' in file C:/ProgramData/PuppetLabs/puppet/etc/modules/windows_autoupdate/manif
ests/init.pp at line 43
Warning: Unrecognised escape sequence '\S' in file C:/ProgramData/PuppetLabs/puppet/etc/modules/windows_autoupdate/manifests/init.pp at line 50
Warning: Unrecognised escape sequence '\S' in file C:/ProgramData/PuppetLabs/puppet/etc/modules/windows_autoupdate/manifests/init.pp at line 57
Warning: Unrecognised escape sequence '\U' in file C:/ProgramData/PuppetLabs/puppet/etc/modules/windows_autoupdate/manifests/init.pp at line 64
Warning: Unrecognised escape sequence '\R' in file C:/ProgramData/PuppetLabs/puppet/etc/modules/windows_autoupdate/manifests/init.pp at line 71
Warning: Unrecognised escape sequence '\N' in file C:/ProgramData/PuppetLabs/puppet/etc/modules/windows_autoupdate/manifests/init.pp at line 78
Warning: Config file C:/ProgramData/PuppetLabs/puppet/etc/hiera.yaml not found, using Hiera defaults
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type registry_key at C:/ProgramData/PuppetLabs/puppet/etc/modules/windows_autoupdate/manifests/init.p:32 on node win-2s7vr325ar2.localdomain

Wrapped exception:
Invalid resource type registry_key
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type registry_key at C:/ProgramData/PuppetLabs/puppet/etc/modules/windows_autoupdate/manifests/init.pp:32 on node win-2s7vr325ar2.localdomain

Problems re-deploying this module to the forge

I am having issues creating the required secure password in the .travis.yml file in order for auto-deployment to the forge to work correctly.

I have done the following:

  • fresh clone of repo
  • gem install travis
  • travis pubkey
  • travis encrypt -s (include escaping)
  • Add the secure string into the .travis.yml file

Having gone through this, including re-creating the tag, many times I am stuck as to why this doesn't work.

You'll see the following issue:

/home/travis/.rvm/gems/ruby-1.9.3-p551/gems/puppet-blacksmith-3.2.0/lib/puppet_blacksmith/forge.rb:51:in `rescue in push!': Error login to the forge https://forgeapi.puppetlabs.com as puppet [400 Bad Request]: {"error":"invalid_grant","error_description":"Username/password do not match"} (Blacksmith::Error)
    from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/puppet-blacksmith-3.2.0/lib/puppet_blacksmith/forge.rb:42:in `push!'
    from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.9/lib/dpl/provider/puppet_forge.rb:38:in `push_app'
    from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.9/lib/dpl/provider.rb:132:in `block in deploy'
    from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.9/lib/dpl/cli.rb:41:in `fold'
    from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.9/lib/dpl/provider.rb:132:in `deploy'
    from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.9/lib/dpl/cli.rb:32:in `run'
    from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.9/lib/dpl/cli.rb:7:in `run'
    from /home/travis/.rvm/gems/ruby-1.9.3-p551/gems/dpl-1.7.9/bin/dpl:5:in `<top (required)>'
    from /home/travis/.rvm/gems/ruby-1.9.3-p551/bin/dpl:23:in `load'
    from /home/travis/.rvm/gems/ruby-1.9.3-p551/bin/dpl:23:in `<main>'

Error applying catalog

Hi,

I am getting an "uninitialized constant" error when i try to apply the WindowsAutoUpdate class. v0.0.2

I have installed the dependencies,
JoshCooper/PowerShell v0.0.6
puppetlabs/registry v0.1.2
puppetlabs/stdlib v3.2.0

I get the following error:
Failed to apply catalog: Parameter path failed on Registry_key[HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]: Munging failed for value "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" in class path: uninitialized constant PuppetX::Puppetlabs::Registry::KEY_WOW64_64KEY at /etc/puppetlabs/puppet/modules/windows_autoupdate/manifests/init.pp:32 Wrapped exception: Munging failed for value "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" in class path: uninitialized constant PuppetX::Puppetlabs::Registry::KEY_WOW64_64KEY

Have I missed something?

Regular expressions reject valid configuration settings

In manifests/init.pp the settings for Scheduled Install Time and Reschedule Wait Time have incorrect validation. The scheduled install time should accept numbers in the range 0-23 but the regular expression accepts a single digit 0, 1, 2, or 3. Likewise the rescheduleWaitTime setting should accept numbers in the range 1-60 but the regular expression accepts a single digit 0, 1, 2, 3, 4, 5 or 6.

validate_re($scheduledInstallTime,['^[0-23]$'])
validate_re($useWUServer,['^[0,1]$'])
validate_re($rescheduleWaitTime,['^[1-60]$'])

Should be something like:

validate_re($scheduledInstallTime,['^(2[0-3]|1?[0-9])$'])
validate_re($useWUServer,['^[0,1]$'])
validate_re($rescheduleWaitTime,['^(60|[1-5][0-9]|[1-9])$'])

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.