microsoft.iis.virtual_directory_info module – Retrive information on a virtual directory in IIS
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.virtual_directory_info
.
Synopsis
Retrive information on a virtual directory in IIS.
Requirements
The below requirements are needed on the host that executes this module.
IISAdministration PowerShell module
Parameters
Parameter |
Comments |
---|---|
The name of the IIS web application to retrieve the virtual directories from. If unset, all website virtual directories will be returned. |
|
The name of the virtual directory to get the information for. If unset, all virtual directories will be returned. |
|
The name of the IIS website to retrieve the virtual directories from. If unset, all website virtual directories will be returned. |
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.virtual_directory
Configures a virtual directory in IIS.
Examples
- name: Get information for all virtual directories
microsoft.iis.virtual_directory_info:
register: vdir_info
- name: Get information for virtual directory on a specific site
microsoft.iis.virtual_directory_info:
site: somesite
name: somedirectory
register: vdir_info
- name: Get information for virtual directory on a specific site and application
microsoft.iis.virtual_directory_info:
site: somesite
name: somedirectory
application: someapplication
register: vdir_info
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
List of virtual directories found. Returned: success Sample: |
|
Application name under which the virtual directory exists. Returned: success |
|
Name of the virtual directory. Returned: success Sample: |
|
Physical path of the virtual directory. Returned: success Sample: |
|
Site name where the virtual directory exists. Returned: success Sample: |
|
Username for the virtual directory when using specific user authentication. Returned: success Sample: |
|
Whether any virtual directories were found. Returned: success Sample: |