microsoft.iis.authentication module – Configures authentication options in IIS
Note
This module is part of the microsoft.iis collection (version 1.3.0).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install microsoft.iis.
To use it in a playbook, specify: microsoft.iis.authentication.
New in microsoft.iis 1.3.0
Synopsis
Adds or modifies authentication options in IIS, including
WindowsAuthenticationand its providers.
Parameters
Parameter |
Comments |
|---|---|
The name of an application or virtual directory under When omitted the configuration is applied at the site root. |
|
The IIS authentication type to configure. Each value maps to a child section of Choices:
|
|
Whether the authentication type is enabled. When omitted the current value on the target is preserved. Choices:
|
|
The ordered list of providers for For example Only valid with When omitted the current providers on the target are preserved. |
|
The name of the IIS site to configure, for example The module resolves the site to the underlying IIS configuration path automatically. |
|
The The valid values are Only valid with When omitted the current value on the target is preserved. Choices:
|
|
Whether kernel-mode authentication is enabled for Only valid with When omitted the current value on the target is preserved. Choices:
|
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full |
Can run in check_mode and return changed status prediction without modifying target, if not supported the action will be skipped. |
|
Support: full |
Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode |
|
Platform: windows |
Target OS/families that can be operated against |
See Also
See also
- microsoft.iis.website
Configures an IIS website.
Examples
- name: Configure Windows Authentication on a site
microsoft.iis.authentication:
site: Default Web Site
auth_type: WindowsAuthentication
enabled: true
providers:
- Negotiate
- NTLM
use_kernel_mode: false
token_checking: None
- name: Enable Anonymous Authentication without changing other settings
microsoft.iis.authentication:
site: Default Web Site
auth_type: AnonymousAuthentication
enabled: true
- name: Update only the providers and preserve the other Windows Authentication settings
microsoft.iis.authentication:
site: Default Web Site
auth_type: WindowsAuthentication
providers:
- Negotiate
- name: Configure Windows Authentication on an application under a site
microsoft.iis.authentication:
site: Default Web Site
application: MyApp
auth_type: WindowsAuthentication
enabled: true
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
The resolved IIS configuration path the authentication configuration was applied to. Returned: always Sample: |