salt.states.win_iis module

Microsoft IIS site management

This module provides the ability to add/remove websites and application pools from Microsoft IIS.

New in version 2016.3.0.

salt.states.win_iis.container_setting(name, container, settings=None)

Set the value of the setting for an IIS container.

Parameters:
  • name (str) -- The name of the IIS container.
  • container (str) -- The type of IIS container. The container types are: AppPools, Sites, SslBindings
  • settings (str) -- A dictionary of the setting names and their values.
salt.states.win_iis.create_app(name, site, sourcepath, apppool=None)

Create an IIS application.

Parameters:
  • name (str) -- The IIS application.
  • site (str) -- The IIS site name.
  • sourcepath (str) -- The physical path.
  • apppool (str) -- The name of the IIS application pool.
salt.states.win_iis.create_apppool(name)

Create an IIS application pool.

Parameters:name (str) -- The name of the IIS application pool.
salt.states.win_iis.create_binding(name, site, hostheader='', ipaddress='*', port=80, protocol='http', sslflags=0)

Create an IIS binding.

Parameters:
  • site (str) -- The IIS site name.
  • hostheader (str) -- The host header of the binding.
  • ipaddress (str) -- The IP address of the binding.
  • port (str) -- The TCP port of the binding.
  • protocol (str) -- The application protocol of the binding.
  • sslflags (str) -- The flags representing certificate type and storage of the binding.
salt.states.win_iis.create_cert_binding(name, site, hostheader='', ipaddress='*', port=443, sslflags=0)

Assign a certificate to an IIS binding.

Parameters:
  • name (str) -- The thumbprint of the certificate.
  • site (str) -- The IIS site name.
  • hostheader (str) -- The host header of the binding.
  • ipaddress (str) -- The IP address of the binding.
  • port (str) -- The TCP port of the binding.
  • sslflags (str) -- Flags representing certificate type and certificate storage of the binding.

New in version Carbon.

salt.states.win_iis.create_vdir(name, site, sourcepath, app='/')

Create an IIS virtual directory.

Parameters:
  • name (str) -- The virtual directory name.
  • site (str) -- The IIS site name.
  • sourcepath (str) -- The physical path.
  • app (str) -- The IIS application.
salt.states.win_iis.deployed(name, sourcepath, apppool='', hostheader='', ipaddress='*', port=80, protocol='http')

Ensure the website has been deployed.

Parameters:
  • name (str) -- The IIS site name.
  • sourcepath (str) -- The physical path of the IIS site.
  • apppool (str) -- The name of the IIS application pool.
  • hostheader (str) -- The host header of the binding.
  • ipaddress (str) -- The IP address of the binding.
  • port (str) -- The TCP port of the binding.
  • protocol (str) -- The application protocol of the binding.
salt.states.win_iis.remove_app(name, site)

Remove an IIS application.

Parameters:
  • name (str) -- The application name.
  • site (str) -- The IIS site name.
salt.states.win_iis.remove_apppool(name)

Remove an IIS application pool.

Parameters:name (str) -- The name of the IIS application pool.
salt.states.win_iis.remove_binding(name, site, hostheader='', ipaddress='*', port=80)

Remove an IIS binding.

Parameters:
  • site (str) -- The IIS site name.
  • hostheader (str) -- The host header of the binding.
  • ipaddress (str) -- The IP address of the binding.
  • port (str) -- The TCP port of the binding.
salt.states.win_iis.remove_cert_binding(name, site, hostheader='', ipaddress='*', port=443)

Remove a certificate from an IIS binding.

Parameters:
  • name (str) -- The thumbprint of the certificate.
  • site (str) -- The IIS site name.
  • hostheader (str) -- The host header of the binding.
  • ipaddress (str) -- The IP address of the binding.
  • port (str) -- The TCP port of the binding.

New in version Carbon.

salt.states.win_iis.remove_site(name)

Delete a website from IIS.

Parameters:name (str) -- The IIS site name.
salt.states.win_iis.remove_vdir(name, site, app='/')

Remove an IIS virtual directory.

Parameters:
  • name (str) -- The virtual directory name.
  • site (str) -- The IIS site name.
  • app (str) -- The IIS application.