community.windows.win_iis_webapplication (2.2.0) — module

Configures IIS web applications

Authors: Henrik Wallström (@henrikwallstrom)

Install collection

Install with ansible-galaxy collection install community.windows:==2.2.0


Add to requirements.yml

  collections:
    - name: community.windows
      version: 2.2.0

Description

Creates, removes, and configures IIS web applications.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add ACME webapplication on IIS.
  community.windows.win_iis_webapplication:
    name: api
    site: acme
    state: present
    physical_path: C:\apps\acme\api

Inputs

    
name:
    description:
    - Name of the web application.
    required: true
    type: str

site:
    description:
    - Name of the site on which the application is created.
    required: true
    type: str

state:
    choices:
    - absent
    - present
    default: present
    description:
    - State of the web application.
    type: str

password:
    description:
    - The password associated with I(username).
    - Required when I(connect_as) is set to C(specific_user).
    type: str

username:
    description:
    - Specifies the user name of an account that can access configuration files and content
      for this application.
    - Required when I(connect_as) is set to C(specific_user).
    type: str

connect_as:
    choices:
    - pass_through
    - specific_user
    description:
    - The type of authentication to use for this application. Either C(pass_through) or
      C(specific_user)
    - If C(pass_through), IIS will use the identity of the user or application pool identity
      to access the file system or network.
    - If C(specific_user), IIS will use the credentials provided in I(username) and I(password)
      to access the file system or network.
    type: str

physical_path:
    description:
    - The physical path on the remote host to use for the new application.
    - The specified folder must already exist.
    type: str

application_pool:
    description:
    - The application pool in which the new site executes.
    - If not specified, the application pool of the current website will be used.
    type: str

Outputs

application_pool:
  description: The used/implemented application_pool value.
  returned: success
  sample: DefaultAppPool
  type: str
connect_as:
  description: How IIS will try to authenticate to the physical_path.
  returned: when the application exists
  sample: specific_user
  type: str
physical_path:
  description: The used/implemented physical_path value.
  returned: success
  sample: C:\apps\acme\api
  type: str

See also