cchurch.win-iis
Win-IIS
Manage basic IIS (Internet Information Services) settings on Windows Server. The Web-Server feature will be installed if it’s not already available.
Role Variables
App Pool Configuration
Use these variables to create or update the app pool for your site:
iis_app_pool_name: This is the name for the app pool; it defaults to'DefaultAppPool'.iis_app_pool_attributes: Any extra settings for the app pool; it defaults to''(no extra settings).
Basic IIS Site Options
These variables are for setting up basic options for your IIS site:
iis_site_name: The name of your IIS site; it defaults to'Default Web Site'.iis_site_id: A numeric ID for your site; this is only needed when creating a new site and defaults to''(no ID).iis_site_ip: The IP address the site will listen to; it defaults to'*'to listen on all addresses.iis_site_port: The port the site listens to; it defaults to80.iis_site_ssl: Whether to enable SSL traffic for the site; it defaults tofalse. Use the options below to set up hostname, protocol, and certificate info for SSL.iis_site_hostname: The main hostname for your site; it defaults to'', meaning it will respond to any hostname not already taken on this IP and port.iis_site_path: The folder containing files for your site; it’ll be created if it doesn’t exist. Default is'C:\inetpub\wwwroot'.iis_site_parameters: Extra parameters for site configuration; defaults to''(no extra parameters).iis_site_state: The state of the site; it defaults to'started'. Use'absent'to remove the site.iis_site_web_config: Path to a Jinja template for creating aweb.configfile; default is"", meaning noweb.configwill be created.iis_site_web_config_force: Whether to always write aweb.configfile even if it already exists; defaults totrue.
Additional Hostnames, Addresses, or Ports
Set up more options for where the site should be available. The iis_binding_* variables let you change settings for each binding item.
iis_binding_host_header: Extra hostname for bindings; defaults to''.iis_binding_ip: Extra IP address to listen to; defaults to'*'.iis_binding_port: Extra port for listening; defaults to80.iis_binding_protocol: Connection protocol; defaults to'http'. Other options include'https'and'ftp'.iis_binding_state: State of the binding; defaults to'present'. Use'absent'to remove a binding.iis_binding_certificate_store_name: The SSL certificate store name; defaults to'My'.iis_binding_certificate_hash: Hash of the SSL certificate; defaults to''(no certificate specified).iis_bindings: A list of site bindings where each item can use these keys to change defaults:host_headeripportprotocolstatecertificate_store_namecertificate_hash
Filesystem Permissions
To adjust file permissions for the site path:
iis_acl_path: The path for updating ACL; defaults toiis_site_path. Use""to skip updates.iis_acl_user: IIS user group; defaults to'IIS_IUSRS'.iis_acl_rights: Rights for the user/group; defaults to'FullControl'.iis_acl_type: Type of ACL; defaults to'allow'.iis_acl_state: ACL state; defaults to'present'.iis_acl_inherit: ACL inheritance options; defaults to'ContainerInherit, ObjectInherit'.iis_acl_propagation: ACL propagation options; defaults to'None'.
Example Playbook
Here’s an example playbook that removes the default IIS site and adds a new site that listens on port 8080 as well as 80:
- hosts: windows
roles:
- role: cchurch.win-iis
iis_site_name: 'Default Web Site'
iis_site_state: absent
- role: cchurch.win-iis
iis_site_name: 'My New Site'
iis_site_path: 'C:\www\mynewsite'
iis_bindings:
- port: 8080
License
BSD
Author Information
Chris Church chris@ninemoreminutes.com
Installa
ansible-galaxy install cchurch.win-iisLicenza
Unknown
Download
676
Proprietario
Python/Django/Ansible, will code for sweet tea and beer.
