microsoft.iis.web_application_info module – Get information on IIS Web Applications
Note
This module is part of the microsoft.iis collection (version 1.0.3).
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_application_info.
Synopsis
- Returns information about IIS web applications.
Requirements
The below requirements are needed on the host that executes this module.
- IISAdministration PowerShell module
Parameters
Parameter | Comments |
|---|---|
name string | Name of the web application. When not specified, information of all existing applications will be fetched or if site is specified, all applications under the site will be fetched. |
site string | Name of the site on which the application is created. When not specified, information of all existing applications will be fetched unless name is specified. Can be used in conjunction with name to fetch information for a specific application when name is not unique. |
Attributes
Attribute | Support | Description |
|---|---|---|
check_mode | Support: full | Can run in check_mode and return changed status prediction without modifying target, if not supported the action will be skipped. |
diff_mode | Support: none | Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode |
platform | Platform: windows | Target OS/families that can be operated against |
See Also
See also
- microsoft.iis.web_application
-
Configures IIS web applications.
- microsoft.iis.website
-
Configures an IIS website.
Examples
- name: Fetch info for all applications under SiteA
microsoft.iis.web_application_info:
site: SiteA
register: info
- name: Fetch info for web application MyApp
microsoft.iis.web_application_info:
name: MyApp
register: info
- name: Fetch info for web application MyApp using site and name - Useful when multiple sites have same app name
microsoft.iis.web_application_info:
name: MyApp
site: SiteA
register: info
- name: Fetch info for all web applications that present in the system
microsoft.iis.web_application_info:
register: info
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
applications list / elements=dictionary | List of applications found. Returned: success Sample: |
|
application_pool string |
The application pool the application is associated with. Returned: success Sample: |
|
connect_as string |
The type of authentication to use for this application. Returned: success Sample: |
|
enabled_protocols string |
The enabled protocols for the application. Returned: success Sample: |
|
name string |
The name of the application. Returned: success Sample: |
|
physical_path string |
The physical path of the application. Returned: success Sample: |
|
site string |
The site the application is associated with. Returned: success Sample: |
|
username string |
The username of the account that can access configuration files and content for this application when Returned: success Sample: |
exists boolean | Whether any applications were found. Returned: success Sample: |
Collection links
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/microsoft/iis/web_application_info_module.html