Forge Home

iis

IIS Provider and Type designed for compatability with as ride a range of Windows Server OS's as possible.

7,318 downloads

6,585 latest version

4.3 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.1.2 (latest)
  • 0.1.1
  • 0.1.0
released Mar 5th 2017
This version is compatible with:
  • Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.6.1 < 5.0.0

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'rmurray-iis', '0.1.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add rmurray-iis
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install rmurray-iis --version 0.1.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

rmurray/iis — version 0.1.2 Mar 5th 2017

iis

Table of Contents

  1. Description
  2. Setup - The basics of getting started with iis
  3. [Resource Types - Types, Attributes and valid values](#Resource Types)
    • [iis_site](#Type Attributes-iis_site)
    • [iis_pool](#Type Attributes-iis_pool)
    • [iis_app](#Type Attributes-iis_app)
    • [iis_vdir](#Type Attributes-iis_vdir)
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module

Description

This Puppet Module is intended to allow Puppet to manage IIS resources (Site's, Application Pools, Applications and Virtual Directories) on older OS's (Windows Server 2008) as well as more current OS (Windows Server 2012).

This module will work with older Windows Server 2008 servers, upgraded to at least WMF 3.0 which is the lowest supported version for 'ConvertTo-Json'. Later OS's using this Module will instead utilise the WebAdministration Powershell Module. Both have very similar functionalities, and the module will account for any deviations.

Setup

At the current time, this module assumes the following:

  • IIS itself is already installed and configgured (future feature)
  • Servers using WMF3.0 have the WebAdministration SnapIn installed (future feature)

Resource Types

The following Resource Types are available:

  • [iis_site](#Type Attributes-iis_site)
    • [attributes](Type Attributes-iis_site-Attribute Values for iis_site)
  • [iis_pool](#Type Attributes-iis_pool)
    • [attributes](Type Attributes-iis_pool-Attribute Values for iis_pool)
  • [iis_app](#Type Attributes-iis_app)
    • [attributes](Type Attributes-iis_app-Attribute Values for iis_app)
  • [iis_vdir](#Type Attributes-iis_vdir)
    • [attributes](Type Attributes-iis_vdir-Attribute Values for iis_vdir)

Type Attributes

iis_site

Example manifest entry for the creation of an IIS Website called 'TestWebsite'

iis_site { 'TestWebsite':
  ensure     => 'present',
  path       => 'D:\inetpub\content\TestWebsite',
  app_pool   => 'TestApplicationPool',
  state      => 'Started',
  hostheader => 'testwebsiteheader',
  protocol   => 'http',
  ip         => '127.0.0.1',
  port       => '80',
  ssl        => 'false',
}

Attribute Values for iis_site

The following values are valid for their corresponding attributes:

path: must be an absolute filepath.

state: stopped, started. Defaults to started.

app_pool: Must match against the following regex: %r{[a-zA-Z0-9-_\'\s]+$} Defaults to 'DefaultAppPool'

hostheader: Must match against the following regex: %r{[a-zA-Z0-9-_\'.\s]+$} OR 'false'

protocol: http, https. Defaults to http.

ip: either , or a valid IPv4 or IPv6 address. Defaults to .

port: Must be a valid port number. Integer, not string.

ssl: true, false. Defaults to false.

iis_pool

Example manifest entry for the creation of an Application Pool called 'TestPool'

iis_pool { 'TestPool':
  ensure              => 'present',
  state               => 'Started',
  enable_32bit        => 'false',
  runtime             => 'v4.0',
  pipeline            => 'Integrated',
  identitytype        => 'SpecificUser',
  identity            => '<DOMAIN>\TestUserAccount',
  identitypassword    => 'hopefullynotplaintextpwd',
  startmode           => 'OnDemand',
  rapidfailprotection => 'true',
  idletimeout         => '8000',
  idletimeoutaction   => 'Terminate',
  maxprocesses        => 1,
  maxqueue            => 1,
  recyclemins         => 60,
  recyclesched        => "23:30:00",
}

Attribute Values for iis_pool

The following values are valid for their corresponding attributes:

state: Stopped, Started. Defaults to Started.

enable_32bit: true, false.

runtime: v4.0, v2.0, nil.

pipeline: Integrated, Classic, 0 (Integrated), 1 (Classic)

identitytype: LocalSystem (or 0), LocalService (or 1), NetworkService (or 2), SpecificUser (or 3), ApplicationPoolIdentity (or 4)

identity: Must match regex: %r{^[a-zA-Z0-9\-_\@.\s]+$} Can Start with a DOMAIN.

identitypassword: No validation. Please don't just use plaintext. Use hiera and/or EYAML.

startmode: OnDemand, AlwaysRunning, true, false.

rapidfailprotection: true, false.

idletimeout: Integer.

idletimeoutaction: Suspend, Terminate.

maxprocesses: Integer.

maxqueue: Integer.

recyclemins: Integer.

recyclesched: String in the format of "HH:MM:SS"

iis_app

Example manifest entry for the creation of an IIS Application called 'MyTestApp'.

iis_app { 'D:\inetpub\content\MyTestSite\MyTestApp':
  ensure       => 'present',
  name         => 'MyTestApp',
  app_pool     => 'MyTestAppPool',
  parent_site  => 'MyTestSite',
}

Attribute Values for iis_app

The following values are valid for their corresponding attributes:

physicalpath: Must be an absolute filepath. This is also the namevar, so title your resource accordingly (see example above). This is to prevent duplicate resource names on a server hosting many Web Apps.

app_pool: Must match against regex: %r{[a-zA-Z0-9-_'\s]+$}. Defaults to DefaultAppPool.

parent_site: Must match against regex: %r{^[a-zA-Z0-9\/-_.'\s]+$}.

iis_vdir

Example manifest entry for the creation of a Virtual Directory.

iis_vdir { '/MyTestVDir':
  parent_site => 'MyTestSite',
  path => 'C:\VdirContents\MyTestVDir',
}

Attribute Values for iis_vdir

The following values are valid for their corresponding attributes:

parent_site: Must match against regex: %r{^[a-zA-Z0-9-_\/\s]+$}

path: Must be a fully qualified filepath.

Limitations

Compatible with the following:

Operating Systems

  • Windows Server 2008 (with installed WebAdministration Powershell SnapIn and WMF 3.0+)
  • Windows Server 2012R2

Puppet

  • 2016.5.1

Ruby