win_iis_website – Configures a IIS Web site¶
Parameters¶
See Also¶
See also
- win_iis_virtualdirectory – Configures a virtual directory in IIS
- The official documentation on the win_iis_virtualdirectory module.
- 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.
Examples¶
# Start a website
- name: Acme IIS site
win_iis_website:
name: Acme
state: started
port: 80
ip: 127.0.0.1
hostname: acme.local
application_pool: acme
physical_path: C:\sites\acme
parameters: logfile.directory:C:\sites\logs
register: website
# Remove Default Web Site and the standard port 80 binding
- name: Remove Default Web Site
win_iis_website:
name: "Default Web Site"
state: absent
# Some commandline examples:
# This return information about an existing host
# $ ansible -i vagrant-inventory -m win_iis_website -a "name='Default Web Site'" window
# host | success >> {
# "changed": false,
# "site": {
# "ApplicationPool": "DefaultAppPool",
# "Bindings": [
# "*:80:"
# ],
# "ID": 1,
# "Name": "Default Web Site",
# "PhysicalPath": "%SystemDrive%\\inetpub\\wwwroot",
# "State": "Stopped"
# }
# }
# This stops an existing site.
# $ ansible -i hosts -m win_iis_website -a "name='Default Web Site' state=stopped" host
# This creates a new site.
# $ ansible -i hosts -m win_iis_website -a "name=acme physical_path=C:\\sites\\acme" host
# Change logfile.
# $ ansible -i hosts -m win_iis_website -a "name=acme physical_path=C:\\sites\\acme" host
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors¶
- Henrik Wallström (@henrikwallstrom)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.