Documentation

win_iis_virtualdirectory - Configures a virtual directory in IIS.

New in version 2.0.

Synopsis

  • Creates, Removes and configures a virtual directory in IIS.

Options

parameter required default choices comments
application
no
The application under which the virtual directory is created or exists.
name
yes
The name of the virtual directory to create or remove
physical_path
no
The physical path to the folder in which the new virtual directory is created. The specified folder must already exist.
site
yes
The site name under which the virtual directory is created or exists.
state
no present
  • 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.

Support

This module is community maintained without core committer oversight.

For more information on what this means please read Module Support

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.