1#!/usr/local/bin/python3.8 2# -*- coding: utf-8 -*- 3 4# Copyright: (c) 2015, Henrik Wallström <henrik@wallstroms.nu> 5# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) 6 7DOCUMENTATION = r''' 8--- 9module: win_iis_webapplication 10short_description: Configures IIS web applications 11description: 12- Creates, removes, and configures IIS web applications. 13options: 14 name: 15 description: 16 - Name of the web application. 17 type: str 18 required: yes 19 site: 20 description: 21 - Name of the site on which the application is created. 22 type: str 23 required: yes 24 state: 25 description: 26 - State of the web application. 27 type: str 28 choices: [ absent, present ] 29 default: present 30 physical_path: 31 description: 32 - The physical path on the remote host to use for the new application. 33 - The specified folder must already exist. 34 type: str 35 application_pool: 36 description: 37 - The application pool in which the new site executes. 38 - If not specified, the application pool of the current website will be used. 39 type: str 40 connect_as: 41 description: 42 - The type of authentication to use for this application. Either C(pass_through) or C(specific_user) 43 - If C(pass_through), IIS will use the identity of the user or application pool identity to access the file system or network. 44 - If C(specific_user), IIS will use the credentials provided in I(username) and I(password) to access the file system or network. 45 type: str 46 choices: [pass_through, specific_user] 47 username: 48 description: 49 - Specifies the user name of an account that can access configuration files and content for this application. 50 - Required when I(connect_as) is set to C(specific_user). 51 type: str 52 password: 53 description: 54 - The password associated with I(username). 55 - Required when I(connect_as) is set to C(specific_user). 56 type: str 57seealso: 58- module: community.windows.win_iis_virtualdirectory 59- module: community.windows.win_iis_webapppool 60- module: community.windows.win_iis_webbinding 61- module: community.windows.win_iis_website 62author: 63- Henrik Wallström (@henrikwallstrom) 64''' 65 66EXAMPLES = r''' 67- name: Add ACME webapplication on IIS. 68 community.windows.win_iis_webapplication: 69 name: api 70 site: acme 71 state: present 72 physical_path: C:\apps\acme\api 73''' 74 75RETURN = r''' 76application_pool: 77 description: The used/implemented application_pool value. 78 returned: success 79 type: str 80 sample: DefaultAppPool 81physical_path: 82 description: The used/implemented physical_path value. 83 returned: success 84 type: str 85 sample: C:\apps\acme\api 86connect_as: 87 description: How IIS will try to authenticate to the physical_path. 88 returned: when the application exists 89 type: str 90 sample: specific_user 91''' 92