microsoft.iis.web_app_pool module – Configure IIS Web Application Pools
Note
This module is part of the microsoft.iis collection (version 1.0.2).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install microsoft.iis
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: microsoft.iis.web_app_pool
.
Synopsis
Creates, removes and configures an IIS Web Application Pool.
Requirements
The below requirements are needed on the host that executes this module.
IISAdministration PowerShell module
Parameters
Parameter |
Comments |
---|---|
This field is a free form dictionary value for the application pool attributes. These attributes are based on the naming standard at https://www.iis.net/configreference/system.applicationhost/applicationpools/add#005, see the examples section for more details on how to set this. You can also set the attributes of child elements like cpu and processModel, see the examples to see how it is done. While you can use the numeric values for enums it is recommended to use the enum name itself, e.g., use SpecificUser instead of 3 for processModel.identityType. managedPipelineMode may be either “Integrated” or “Classic”. startMode may be either “OnDemand” or “AlwaysRunning”. Use When trying to set Default: |
|
Name of the application pool. |
|
The state of the application pool. If If If If If Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying target, if not supported the action will be skipped. |
|
Support: none |
Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode |
|
Platform: windows |
Target OS/families that can be operated against |
See Also
See also
- microsoft.iis.web_app_pool_info
Get information on IIS Web Application Pools.
Examples
- name: Create a new application pool in 'Started' state
microsoft.iis.web_app_pool:
name: AppPool
state: started
- name: Stop an application pool
microsoft.iis.web_app_pool:
name: AppPool
state: stopped
- name: Restart an application pool (non-idempotent)
microsoft.iis.web_app_pool:
name: AppPool
state: restarted
- name: Change application pool attributes using new dict style
microsoft.iis.web_app_pool:
name: AppPool
attributes:
managedRuntimeVersion: v4.0
autoStart: false
- name: Creates an application pool, sets attributes and starts it
microsoft.iis.web_app_pool:
name: AnotherAppPool
state: started
attributes:
managedRuntimeVersion: v4.0
autoStart: false
- name: Creates an application pool with "No Managed Code" for .Net compatibility
microsoft.iis.web_app_pool:
name: AnotherAppPool
state: started
attributes:
managedRuntimeVersion: ''
autoStart: false
- name: Manage child element and set identity of application pool
microsoft.iis.web_app_pool:
name: IdentitiyAppPool
state: started
attributes:
managedPipelineMode: Classic
processModel.identityType: SpecificUser
processModel.userName: "{{ ansible_user }}"
processModel.password: "{{ ansible_password }}"
processModel.loadUserProfile: true
- name: Manage a timespan attribute
microsoft.iis.web_app_pool:
name: TimespanAppPool
state: started
attributes:
recycling.periodicRestart.time: "00:00:05:00.000000"
recycling.periodicRestart.schedule: ["00:10:00", "05:30:00"]
processModel.pingResponseTime: "00:03:00"