Skip to content

Latest commit

 

History

History
176 lines (140 loc) · 8.04 KB

community.windows.win_iis_virtualdirectory_module.rst

File metadata and controls

176 lines (140 loc) · 8.04 KB

community.windows.win_iis_virtualdirectory

Configures a virtual directory in IIS

  • Creates, Removes and configures a virtual directory in IIS.
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
    Choices:
  • absent
  • present ←
Whether to add or remove the specified virtual directory.
Removing will remove the virtual directory and all under it (Recursively).

.. seealso::

   :ref:`community.windows.win_iis_webapplication_module`
      The official documentation on the **community.windows.win_iis_webapplication** module.
   :ref:`community.windows.win_iis_webapppool_module`
      The official documentation on the **community.windows.win_iis_webapppool** module.
   :ref:`community.windows.win_iis_webbinding_module`
      The official documentation on the **community.windows.win_iis_webbinding** module.
   :ref:`community.windows.win_iis_website_module`
      The official documentation on the **community.windows.win_iis_website** module.


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

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

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

Authors

  • Henrik Wallström (@henrikwallstrom)