Showing with 210 additions and 56 deletions.
  1. +4 −0 .rubocop.yml
  2. +1 −1 .travis.yml
  3. +17 −2 CHANGELOG.md
  4. +1 −0 Gemfile
  5. +97 −0 HISTORY.md
  6. +74 −48 README.md
  7. +11 −0 Rakefile
  8. +1 −0 lib/puppet/type/windowsfeature.rb
  9. +3 −3 metadata.json
  10. +1 −2 spec/spec_helper.rb
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -530,3 +530,7 @@ Layout/IndentHeredoc:
# disable Yaml safe_load. This is needed to support ruby2.0.0 development envs
Security/YAMLLoad:
Enabled: false

# This affects hiera interpolation, as well as some configs that we push.
Style/FormatStringToken:
Enabled: false
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ matrix:
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.4.1
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 5.0" CHECK=test
env: PUPPET_VERSION="~> 5.0" CHECK=test_with_coveralls
- rvm: 2.4.1
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 5.0" CHECK=rubocop
Expand Down
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,22 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v3.0.0](https://github.com/voxpupuli/puppet-windowsfeature/tree/v3.0.0) (2017-09-17)
[Full Changelog](https://github.com/voxpupuli/puppet-windowsfeature/compare/v0.0.3...v3.0.0)
## [v3.1.0](https://github.com/voxpupuli/puppet-windowsfeature/tree/v3.1.0) (2017-09-21)
[Full Changelog](https://github.com/voxpupuli/puppet-windowsfeature/compare/v3.0.0...v3.1.0)

**Closed issues:**

- Updated Documentation wording + Documentation + Badges [\#96](https://github.com/voxpupuli/puppet-windowsfeature/issues/96)
- Does not work on Windows 2008 [\#39](https://github.com/voxpupuli/puppet-windowsfeature/issues/39)

**Merged pull requests:**

- Remove Windows 2008 Support and Add Windows 2016 Support [\#103](https://github.com/voxpupuli/puppet-windowsfeature/pull/103) ([TraGicCode](https://github.com/TraGicCode))
- Deprecation notice for the restart parameter [\#102](https://github.com/voxpupuli/puppet-windowsfeature/pull/102) ([TraGicCode](https://github.com/TraGicCode))
- Fixing readme markdown formatting issues [\#99](https://github.com/voxpupuli/puppet-windowsfeature/pull/99) ([TraGicCode](https://github.com/TraGicCode))

## [v3.0.0](https://github.com/voxpupuli/puppet-windowsfeature/tree/v3.0.0) (2017-09-18)
[Full Changelog](https://github.com/voxpupuli/puppet-windowsfeature/compare/v2.1.0...v3.0.0)

**Fixed bugs:**

Expand All @@ -14,6 +28,7 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- Release 3.0.0 [\#95](https://github.com/voxpupuli/puppet-windowsfeature/pull/95) ([TraGicCode](https://github.com/TraGicCode))
- Refactor Hacky boolean validation [\#93](https://github.com/voxpupuli/puppet-windowsfeature/pull/93) ([TraGicCode](https://github.com/TraGicCode))
- In a windows only module we don't want non-windows nodesets [\#92](https://github.com/voxpupuli/puppet-windowsfeature/pull/92) ([TraGicCode](https://github.com/TraGicCode))
- \(GH-86\) Fix invalid XML from Get-WindowsFeature [\#88](https://github.com/voxpupuli/puppet-windowsfeature/pull/88) ([jarretlavallee](https://github.com/jarretlavallee))
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ group :development do
end

group :system_tests do
gem 'winrm', :require => false
if beaker_version = ENV['BEAKER_VERSION']
gem 'beaker', *location_for(beaker_version)
end
Expand Down
97 changes: 97 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Changelog

## v2.1.0 (2017-02-11)

This is the last release with Puppet3 support!
* Switched everything over to XML and updated tests.
* some fixes from getting rid of trying flush
* Converted from CSV to XML - Resolved merge conflict
* Set minimum version_requirement for Puppet

## v2.0.2 (2016-08-18)
### Summary

Switched from CSV to XML

## v2.0.1 (2016-07-13)
### Summary

A bug fix to support Windows 2008

### Features
- moved from PowerShell JSON conversion to CSV for Windows 2008 support (#57)

## v2.0.0 (2016-06-16)
### Summary
- modulesync with latest voxpupuli settings (#46, #51)
- Drop of Ruby1.8!
- Enhanced Unit/Acceptance tests (#47, #53)

#### Features
- windowsfeature as native Type and Provider (#47)


## v1.1.0 (2015-05-01)
### Summary

A few small features in this release. First release under the new puppet-community namespace

#### Features

- added new timeout `parameter` for features that take longer than the default 300 seconds to complete.
- added support for kernelversion 10 for people deploying on Windows 10

## v1.0.0 (2014-10-13)
### Summary

Finally bumping to 1.0.

#### Features

- adding `source` paramater
- updating documentation

## v0.2.0 (2014-08-14)
### Summary

Small release to bump stdlib dependency to be 4.0 minimum

## v0.1.2 (2014-04-14)
### Summary

This release fixes some minor idempotency and platform specific bugs

#### Bugfixes

- fixing idempotency
- fixed installation on windows 2008

## v0.1.1 (2014-04-04)
### Summary

This release adds support for windows 2012

## v0.1.0 (2014-04-04)
### Summary

This release adding some new parameters to install sub features and management tools

#### Features

- added `includemanagementtools` and `includesubfeatures` parameters

#### Bugfixes

- limit module usage for Windows 2008 R2 and newer versions of Windows


## v0.0.3 (2014-03-30)

### Summary

This release replaces all the hardcoded powershell with uses of the joshcopper/powershell provider

## v0.0.2 (2014-01-19)
### Summary

Initial version.
122 changes: 74 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
# puppet-windowsfeature

[![License](https://img.shields.io/github/license/voxpupuli/puppet-windowsfeature.svg)](https://github.com/voxpupuli/puppet-windowsfeature/blob/master/LICENSE)
[![Build Status](https://travis-ci.org/voxpupuli/puppet-windowsfeature.svg?branch=master)](https://travis-ci.org/voxpupuli/puppet-windowsfeature)
[![Code Coverage](https://coveralls.io/repos/github/voxpupuli/puppet-windowsfeature/badge.svg?branch=master)](https://coveralls.io/github/voxpupuli/puppet-windowsfeature?branch=master)
[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/windowsfeature.svg)](https://forge.puppetlabs.com/puppet/windowsfeature)
[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/windowsfeature.svg)](https://forge.puppetlabs.com/puppet/windowsfeature)
[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/windowsfeature.svg)](https://forge.puppetlabs.com/puppet/windowsfeature)
[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/windowsfeature.svg)](https://forge.puppetlabs.com/puppet/windowsfeature)

#### Table of Contents

1. [Overview](#overview)
2. [Module Description - What the module does and why it is useful](#module-description)
3. [Setup - The basics of getting started with windowsfeature](#setup)
* [What windowsfeature affects](#what-windowsfeature-affects)
* [Setup requirements](#setup-requirements)
* [Beginning with windowfeature](#beginning-with-windowsfeature)
4. [Usage - Configuration options and additional functionality](#usage)
5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
5. [Limitations - OS compatibility, etc.](#limitations)
6. [Development - Guide for contributing to the module](#development)

## Overview

The windowsfeature module is a small define that allows you to install/remove windows features.

[![Build Status](https://travis-ci.org/voxpupuli/puppet-windowsfeature.svg?branch=master)](https://travis-ci.org/voxpupuli/puppet-windowsfeature)
The windowsfeature module allows you to install/remove windows features.

## Module Description

Expand All @@ -35,77 +40,97 @@ For a list of the windows features you can install, please visit this [technet a

* windowsfeature makes use of Powershell so you will need to have at least version 2.0 installed in order to use this module.

## Beginning
## Usage

To install a single windows feature such as dotnet 3.5:
To install a single windows feature such as .NET 3.5:

windowsfeature { 'NET-Framework-Core':
ensure => present,
}
```puppet
windowsfeature { 'NET-Framework-Core':
ensure => present,
}
```

To install several windows features as part of a large application such IIS:

```puppet
$iis_features = ['Web-Server','Web-WebServer','Web-Asp-Net45','Web-ISAPI-Ext','Web-ISAPI-Filter','NET-Framework-45-ASPNET','WAS-NET-Environment','Web-Http-Redirect','Web-Filtering','Web-Mgmt-Console','Web-Mgmt-Tools']
$iis_features = ['Web-Server','Web-WebServer','Web-Asp-Net45','Web-ISAPI-Ext','Web-ISAPI-Filter','NET-Framework-45-ASPNET','WAS-NET-Environment','Web-Http-Redirect','Web-Filtering','Web-Mgmt-Console','Web-Mgmt-Tools']

windowsfeature { $iis_features:
ensure => present,
}
windowsfeature { $iis_features:
ensure => present,
}
```

To install any associated management tools:

windowsfeature { 'Web-WebServer':
ensure => present,
installmanagementtools => true
}
```puppet
windowsfeature { 'Web-WebServer':
ensure => present,
installmanagementtools => true,
}
```

To install all subfeatures without having to list them all out:

To install all subfeatures:
```puppet
windowsfeature { 'Web-WebServer':
ensure => present,
installsubfeatures => true,
}
```

windowsfeature { 'Web-WebServer':
ensure => present,
installsubfeatures => true
}
To install a feature and reboot if one is pending:

To install a feature and that requires a restart:
```puppet
windowsfeature {'RDS-RD-Server':
ensure => present,
restart => 'true'
}
windowsfeature { 'RDS-RD-Server':
ensure => present,
}
## Usage
reboot {'after_RDS_RD_Server':
when => pending,
subscribe => Windowsfeature['RDS-RD-Server'],
}
```

### Classes and Defined Types
**DEPRECATION NOTICE: The restart parameter has been deprecated in favor of the puppetlabs reboot module ( https://github.com/puppetlabs/puppetlabs-reboot ). This parameter will be removed in the next release.**

##Reference
## Reference

### Types

* `windowsfeature`: Installs a Windows Feature
Parameters are optional unless otherwise noted.

###Parameters
#### `windowsfeature`

####Type: windowsfeature
##### `ensure`

#####`ensure`
Specifies the basic state of the resource. Valid values are 'present', 'absent'.
Specifies whether the feature should be present. Valid options: 'present', 'installed' and 'absent'.

#####`name`
*Required* This name of the feature you want to manage
Default: 'present'.

#####`installmanagementtools`
*Optional* Specifies that all applicable management tools of the roles, role services, or features specified by the Name parameter should be installed. Note: Although management tools are installed by default when you are installing features by using the , management tools are not installed by default when you install features by using the Install-WindowsFeature cmdlet; this parameter must be added to install management tools.
##### `name`

#####`installsubfeatures`
*Optional* Specifies that all subordinate role services, and all subfeatures of parent roles, role services, or features specified by the Name parameter should be installed.
*Required.*

#####`restart`
*Optional* Specifies that the target system is restarted automatically, if a restart is required by the installation process for the specified roles or features.
The name of the feature you want to manage.

#####`source`
*Optional* Specify the location of an installation source. The source must be from the exact same version of Windows for the reinstallation to work. Without this parameter, PowerShell will use Windows Update by default to look for an installation source
##### `installmanagementtools`

##Upgrading from 1.0.1 Release
Specifies that all applicable management tools of the roles, role services, or features specified by the Name parameter should be installed. Note: Although management tools are installed by default when you are installing features by using the UI, management tools are not installed by default when you install features by using the Install-WindowsFeature cmdlet; this parameter must be added to install management tools.

##### `installsubfeatures`

Specifies that all subordinate role services, and all subfeatures of parent roles, role services, or features specified by the Name parameter should be installed.

##### `restart`

Specifies that the target system is restarted automatically, if a restart is required by the installation process for the specified roles or features.

##### `source`

Specify the location of an installation source. The source must be from the exact same version of Windows for the reinstallation to work. Without this parameter, PowerShell will use Windows Update by default to look for an installation source

## Upgrading from 1.0.1 Release

Previously, the windows features were managed by individual execs:

Expand All @@ -125,6 +150,7 @@ The new 2.0.0 release uses native types and providers, which speeds up the time
For example, enabling all the Windows features for a standard IIS setuo after features are installed (ie. an idempotent run):

1.0.0 release:

```
win-2012R2-std 01:29:30$ puppet apply --verbose --detailed-exitcodes C:\Windows\Temp\apply_manifest.pp.8276
Info: Loading facts
Expand All @@ -149,10 +175,10 @@ Another benefit is this module now has less dependancies on other modules, as it

This module is tested on the following platforms:

* Windows 2008
* Windows 2008 R2
* Windows 2012
* Windows 2012 R2
* Windows 2016

It is tested with the OSS version of Puppet only.

Expand Down
11 changes: 11 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ task test: [
:release_checks,
]

desc "Run main 'test' task and report merged results to coveralls"
task test_with_coveralls: [:test] do
if Dir.exist?(File.expand_path('../lib', __FILE__))
require 'coveralls/rake/task'
Coveralls::RakeTask.new
Rake::Task['coveralls:push'].invoke
else
puts 'Skipping reporting to coveralls. Module has no lib dir'
end
end

begin
require 'github_changelog_generator/task'
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/type/windowsfeature.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
end

newparam(:restart, boolean: true, parent: Puppet::Parameter::Boolean) do
Puppet.deprecation_warning('The restart parameter has been deprecated in favor of the puppetlabs reboot module ( https://github.com/puppetlabs/puppetlabs-reboot ). This parameter will be removed in the next release.')
end

newparam(:source) do
Expand Down
6 changes: 3 additions & 3 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppet-windowsfeature",
"version": "3.0.0",
"version": "3.1.0",
"author": "Vox Pupuli",
"license": "MIT",
"summary": "A module that will turn windows features on or off for Windows Server 2008 and above",
Expand All @@ -16,10 +16,10 @@
{
"operatingsystem": "windows",
"operatingsystemrelease": [
"2008",
"2008R2",
"2012",
"2012R2"
"2012R2",
"2016"
]
}
],
Expand Down
Loading