win_iis_virtualdirectory – Configures a virtual directory in IIS

From Get docs
Ansible/docs/2.8/modules/win iis virtualdirectory module


win_iis_virtualdirectory – Configures a virtual directory in IIS

New in version 2.0.


Synopsis

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

Parameters

Parameter Choices/Defaults Comments

application

string

The application under which the virtual directory is created or exists.

name

string / required

The name of the virtual directory to create or remove.

physical_path

string

The physical path to the folder in which the new virtual directory is created.

The specified folder must already exist.

site

string / required

The site name under which the virtual directory is created or exists.

state

string

  • absent
  • present

Whether to add or remove the specified virtual directory.



See Also

See also

win_iis_webapplication – Configures IIS web applications
The official documentation on the win_iis_webapplication module.
win_iis_webapppool – Configure IIS Web Application Pools
The official documentation on the win_iis_webapppool module.
win_iis_webbinding – Configures a IIS Web site binding
The official documentation on the win_iis_webbinding module.
win_iis_website – Configures a IIS Web site
The official documentation on the win_iis_website module.


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

Authors

  • Henrik Wallström (@henrikwallstrom)

Hint

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


© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.8/modules/win_iis_virtualdirectory_module.html