| 1 |
--- |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
DOCUMENTATION: |
| 6 |
module: website_info |
| 7 |
short_description: Get information on IIS websites |
| 8 |
description: |
| 9 |
- Returns information about IIS websites. |
| 10 |
requirements: |
| 11 |
- IISAdministration PowerShell module |
| 12 |
options: |
| 13 |
name: |
| 14 |
description: |
| 15 |
- Name of the website. |
| 16 |
- When not specified, information of all existing websites will be fetched. |
| 17 |
type: str |
| 18 |
required: false |
| 19 |
extends_documentation_fragment: |
| 20 |
- ansible.builtin.action_common_attributes |
| 21 |
attributes: |
| 22 |
check_mode: |
| 23 |
support: full |
| 24 |
diff_mode: |
| 25 |
support: none |
| 26 |
platform: |
| 27 |
platforms: |
| 28 |
- windows |
| 29 |
seealso: |
| 30 |
- module: microsoft.iis.website |
| 31 |
author: |
| 32 |
- Shahar Golshani (@sgolshan) |
| 33 |
|
| 34 |
EXAMPLES: | |
| 35 |
- name: Return information about an existing website |
| 36 |
microsoft.iis.website_info: |
| 37 |
name: 'Default Web Site' |
| 38 |
register: stored_info |
| 39 |
|
| 40 |
- name: Returns information about all websites that exist on the system |
| 41 |
microsoft.iis.website_info: |
| 42 |
register: stored_info_all |
| 43 |
|
| 44 |
RETURN: |
| 45 |
exists: |
| 46 |
description: |
| 47 |
- Whether any website were found. |
| 48 |
returned: always |
| 49 |
type: bool |
| 50 |
sample: true |
| 51 |
site: |
| 52 |
description: |
| 53 |
- Contains list of dictionaries. |
| 54 |
- Every dictionary in the list contains name and information of a website. |
| 55 |
returned: success |
| 56 |
type: list |
| 57 |
elements: dict |
| 58 |
sample: | |
| 59 |
[ |
| 60 |
{ |
| 61 |
"name": "Default Web Site", |
| 62 |
"state": "Started" |
| 63 |
"site_id": 1, |
| 64 |
"physical_path": "C:\\inetpub\\wwwroot", |
| 65 |
"application_pool": "DefaultAppPool", |
| 66 |
"bindings": [ |
| 67 |
{ |
| 68 |
"ip": "127.0.0.1", |
| 69 |
"port": 80, |
| 70 |
"hostname": "iis_website.com", |
| 71 |
"protocol": "http", |
| 72 |
"use_ccs": false, |
| 73 |
"use_sni": false |
| 74 |
} |
| 75 |
] |
| 76 |
} |
| 77 |
] |
| 78 |
contains: |
| 79 |
name: |
| 80 |
description: |
| 81 |
- Name of the website. |
| 82 |
type: str |
| 83 |
sample: Default Web Site |
| 84 |
site_id: |
| 85 |
description: |
| 86 |
- Specifies the website ID. |
| 87 |
type: int |
| 88 |
sample: 1 |
| 89 |
state: |
| 90 |
description: |
| 91 |
- Specifies the website state Started/Stopped. |
| 92 |
type: str |
| 93 |
sample: "Started" |
| 94 |
application_pool: |
| 95 |
description: |
| 96 |
- Specifies the application pool in which the website runs. |
| 97 |
type: str |
| 98 |
sample: "DefaultAppPool" |
| 99 |
physical_path: |
| 100 |
description: |
| 101 |
- Specifies the physical folder path of the website. |
| 102 |
type: str |
| 103 |
sample: "C:\\inetpub\\wwwroot" |
| 104 |
bindings: |
| 105 |
description: |
| 106 |
- List of dictionaries that hold the information of all the website bindings. |
| 107 |
type: list |
| 108 |
elements: dict |
| 109 |
contains: |
| 110 |
hostname: |
| 111 |
description: The website binding hostname (DNS). |
| 112 |
type: str |
| 113 |
sample: "iis_website.com" |
| 114 |
ip: |
| 115 |
description: The website binding listen IP. |
| 116 |
type: str |
| 117 |
sample: "127.0.0.1" |
| 118 |
port: |
| 119 |
description: The website binding listen port. |
| 120 |
type: int |
| 121 |
sample: 80 |
| 122 |
protocol: |
| 123 |
description: The website used protocol. |
| 124 |
type: str |
| 125 |
sample: "http" |
| 126 |
use_sni: |
| 127 |
description: Require Server Name Indication (SNI) for SSL certificates. |
| 128 |
type: bool |
| 129 |
sample: true |
| 130 |
use_ccs: |
| 131 |
description: Use Centralized Certificate Store (CCS) for SSL certificates. |
| 132 |
type: str |
| 133 |
sample: "true" |
| 134 |
certificate_hash: |
| 135 |
description: The SSL certificate hash used by the server. |
| 136 |
type: str |
| 137 |
sample: "005930BD42F4869B81150A81B3B922F839412CC7" |
| 138 |
certificate_store_name: |
| 139 |
description: The SSL certificate local store name. |
| 140 |
type: str |
| 141 |
sample: "MY" |