1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Henrik Wallström <henrik@wallstroms.nu>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = r'''
---
module: win_iis_webapppool
version_added: "2.0"
short_description: Configures an IIS Web Application Pool.
description:
- Creates, Removes and configures an IIS Web Application Pool
options:
name:
description:
- Name of application pool
required: true
default: null
aliases: []
state:
description:
- State of the binding
choices:
- absent
- stopped
- started
- restarted
required: false
default: null
attributes:
description:
- 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 C(state) module parameter to modify, states shown are reflect the possible runtime values.
required: false
default: null
author: Henrik Wallström
'''
EXAMPLES = r'''
- 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 = '''
attributes:
description:
- Application Pool attributes from that were processed by this module invocation.
returned: success
type: dictionary
sample:
"enable32BitAppOnWin64": "true"
"managedRuntimeVersion": "v4.0"
"managedPipelineMode": "Classic"
info:
description: Information on current state of the Application Pool
returned: success
type: complex
sample:
contains:
attributes:
description: key value pairs showing the current Application Pool attributes
returned: success
type: dictionary
sample:
"autoStart": true
"managedRuntimeLoader": "webengine4.dll"
"managedPipelineMode": "Classic"
"name": "DefaultAppPool"
"CLRConfigFile": ""
"passAnonymousToken": true
"applicationPoolSid": "S-1-5-82-1352790163-598702362-1775843902-1923651883-1762956711"
"queueLength": 1000
"managedRuntimeVersion": "v4.0"
"state": "Started"
"enableConfigurationOverride": true
"startMode": "OnDemand"
"enable32BitAppOnWin64": true
name:
description:
- Name of Application Pool that was processed by this module invocation.
returned: success
type: string
sample: "DefaultAppPool"
state:
description:
- Current runtime state of the pool as the module completed.
returned: success
type: string
sample: "Started"
'''
|