Documentation

win_iis_webapppool - Configures an IIS Web Application Pool.

New in version 2.0.

Synopsis

  • Creates, Removes and configures an IIS Web Application Pool

Options

parameter required default choices comments
attributes
no
Application Pool attributes from string where attributes are separated by a pipe and attribute name/values by colon Ex. "foo:1|bar:2".
The following attributes may only have the following names.
managedPipelineMode may be either "Integrated" or "Classic".
startMode may be either "OnDemand" or "AlwaysRunning".
state may be one of "Starting", "Started", "Stopping", "Stopped", "Unknown". Use the state module parameter to modify, states shown are reflect the possible runtime values.
name
yes
Name of application pool
state
no
  • absent
  • stopped
  • started
  • restarted
State of the binding

Examples

- name: return information about an existing application pool
  win_iis_webapppool:
    name: DefaultAppPool

- name: Create a new application pool in 'Started' state
  win_iis_webapppool:
    name: AppPool
    state: started

- name: Stop an application pool
  win_iis_webapppool:
    name: AppPool
    state: stopped

- name: Restart an application pool
  win_iis_webapppool:
    name: AppPool
    state: restart

- name: Changes application pool attributes without touching state
  win_iis_webapppool:
    name: AppPool
    attributes: 'managedRuntimeVersion:v4.0|autoStart:false'

- name: Creates an application pool and sets attributes
  win_iis_webapppool:
    name: AnotherAppPool
    state: started
    attributes: 'managedRuntimeVersion:v4.0|autoStart:false'

# Playbook example
---

- name: App Pool with .NET 4.0
  win_iis_webapppool:
    name: 'AppPool'
    state: started
    attributes: managedRuntimeVersion:v4.0
  register: webapppool

Return Values

Common return values are documented here Return Values, the following are the fields unique to this module:

name description returned type sample
info Information on current state of the Application Pool success complex None
contains:
name description returned type sample
attributes key value pairs showing the current Application Pool attributes success dictionary {'managedRuntimeLoader': 'webengine4.dll', 'applicationPoolSid': 'S-1-5-82-1352790163-598702362-1775843902-1923651883-1762956711', 'managedPipelineMode': 'Classic', 'enable32BitAppOnWin64': True, 'name': 'DefaultAppPool', 'passAnonymousToken': True, 'CLRConfigFile': '', 'queueLength': 1000, 'state': 'Started', 'enableConfigurationOverride': True, 'autoStart': True, 'startMode': 'OnDemand', 'managedRuntimeVersion': 'v4.0'}
state ['Current runtime state of the pool as the module completed.'] success string Started
name ['Name of Application Pool that was processed by this module invocation.'] success string DefaultAppPool
attributes ['Application Pool attributes from that were processed by this module invocation.'] success dictionary {'managedPipelineMode': 'Classic', 'enable32BitAppOnWin64': 'true', 'managedRuntimeVersion': 'v4.0'}


Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Support

This module is community maintained without core committer oversight.

For more information on what this means please read Module Support

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.