| 1 |
--- |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
DOCUMENTATION: |
| 6 |
module: web_application_info |
| 7 |
short_description: Get information on IIS Web Applications |
| 8 |
description: |
| 9 |
- Returns information about IIS web applications. |
| 10 |
requirements: |
| 11 |
- IISAdministration PowerShell module |
| 12 |
options: |
| 13 |
name: |
| 14 |
description: |
| 15 |
- Name of the web application. |
| 16 |
- When not specified, information of all existing applications will be fetched or if site is specified, all applications under the site will be fetched. |
| 17 |
type: str |
| 18 |
site: |
| 19 |
description: |
| 20 |
- Name of the site on which the application is created. |
| 21 |
- When not specified, information of all existing applications will be fetched unless name is specified. |
| 22 |
- Can be used in conjunction with name to fetch information for a specific application when name is not unique. |
| 23 |
type: str |
| 24 |
extends_documentation_fragment: |
| 25 |
- ansible.builtin.action_common_attributes |
| 26 |
attributes: |
| 27 |
check_mode: |
| 28 |
support: full |
| 29 |
diff_mode: |
| 30 |
support: none |
| 31 |
platform: |
| 32 |
platforms: |
| 33 |
- windows |
| 34 |
seealso: |
| 35 |
- module: microsoft.iis.web_application |
| 36 |
- module: microsoft.iis.website |
| 37 |
author: |
| 38 |
- Ron Gershburg (@rgershbu) |
| 39 |
|
| 40 |
EXAMPLES: | |
| 41 |
- name: Fetch info for all applications under SiteA |
| 42 |
microsoft.iis.web_application_info: |
| 43 |
site: SiteA |
| 44 |
register: info |
| 45 |
|
| 46 |
- name: Fetch info for web application MyApp |
| 47 |
microsoft.iis.web_application_info: |
| 48 |
name: MyApp |
| 49 |
register: info |
| 50 |
|
| 51 |
- name: Fetch info for web application MyApp using site and name - Useful when multiple sites have same app name |
| 52 |
microsoft.iis.web_application_info: |
| 53 |
name: MyApp |
| 54 |
site: SiteA |
| 55 |
register: info |
| 56 |
|
| 57 |
- name: Fetch info for all web applications that present in the system |
| 58 |
microsoft.iis.web_application_info: |
| 59 |
register: info |
| 60 |
|
| 61 |
RETURN: |
| 62 |
exists: |
| 63 |
description: |
| 64 |
- Whether any applications were found. |
| 65 |
returned: success |
| 66 |
type: bool |
| 67 |
sample: true |
| 68 |
applications: |
| 69 |
description: |
| 70 |
- List of applications found. |
| 71 |
returned: success |
| 72 |
type: list |
| 73 |
elements: dict |
| 74 |
sample: '[ |
| 75 |
{ |
| 76 |
"application_pool": "testpool", |
| 77 |
"enabled_protocols": "http", |
| 78 |
"name": "TestAppA", |
| 79 |
"physical_path": "C:\\Users\\Administrator\\AppData\\Local\\Temp\\foldera", |
| 80 |
"site": "Test Site One" |
| 81 |
"connect_as": "pass_through" |
| 82 |
"username": "" |
| 83 |
}, |
| 84 |
{ |
| 85 |
"application_pool": "DefaultAppPool", |
| 86 |
"enabled_protocols": "http", |
| 87 |
"name": "TestAppB", |
| 88 |
"physical_path": "C:\\Users\\Administrator\\AppData\\Local\\Temp\\folderb", |
| 89 |
"site": "Test Site Two" |
| 90 |
"connect_as": "specific_user" |
| 91 |
"username": "testuser" |
| 92 |
} |
| 93 |
]' |
| 94 |
contains: |
| 95 |
application_pool: |
| 96 |
description: |
| 97 |
- The application pool the application is associated with. |
| 98 |
type: str |
| 99 |
sample: testpool |
| 100 |
enabled_protocols: |
| 101 |
description: |
| 102 |
- The enabled protocols for the application. |
| 103 |
type: str |
| 104 |
sample: http |
| 105 |
name: |
| 106 |
description: |
| 107 |
- The name of the application. |
| 108 |
type: str |
| 109 |
sample: TestApp |
| 110 |
physical_path: |
| 111 |
description: |
| 112 |
- The physical path of the application. |
| 113 |
type: str |
| 114 |
sample: C:\Users\Administrator\AppData\Local\Temp\AppFolder |
| 115 |
site: |
| 116 |
description: |
| 117 |
- The site the application is associated with. |
| 118 |
type: str |
| 119 |
sample: Test Site One |
| 120 |
connect_as: |
| 121 |
description: |
| 122 |
- The type of authentication to use for this application. |
| 123 |
type: str |
| 124 |
sample: pass_through |
| 125 |
username: |
| 126 |
description: |
| 127 |
- The username of the account that can access configuration files and content for this application when RV(applications.connect_as=specific_user). |
| 128 |
type: str |
| 129 |
sample: testuser |