win_iis_virtualdirectory - Configures a virtual directory in IIS

New in version 2.0.

Synopsis

Parameters

Parameter Choices/Defaults Comments
application
The application under which the virtual directory is created or exists.
name
required
The name of the virtual directory to create or remove.
physical_path
The physical path to the folder in which the new virtual directory is created.
The specified folder must already exist.
site
required
The site name under which the virtual directory is created or exists.
state
    Choices:
  • absent
  • present ←
Whether to add or remove the specified virtual directory.

Examples

- name: Create a virtual directory if it does not exist
  win_iis_virtualdirectory:
    name: somedirectory
    site: somesite
    state: present
    physical_path: C:\virtualdirectory\some

- name: Remove a virtual directory if it exists
  win_iis_virtualdirectory:
    name: somedirectory
    site: somesite
    state: absent

- name: Create a virtual directory on an application if it does not exist
  win_iis_virtualdirectory:
    name: somedirectory
    site: somesite
    application: someapp
    state: present
    physical_path: C:\virtualdirectory\some

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Maintenance

This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.

For a list of other modules that are also maintained by the Ansible Community, see here.

Author

  • Henrik Wallström

Hint

If you notice any issues in this documentation you can edit this document to improve it.