The only way my colleagues have found to do this is via appcmd.  If you are 
on ansible 2.2. you could use win_command instead of raw but the rest of 
the syntax would probably be the same as below:

- name: Add authentication for Site
  raw: 'C:\Windows\System32\inetsrv\appcmd.exe set config 
"Site/" 
-section:system.webServer/security/authentication/anonymousAuthentication 
/enabled:"True" /commit:apphost'

- name: Add authentication user for Site
  raw: 'C:\Windows\System32\inetsrv\appcmd.exe set config "Site/" 
-section:system.webServer/security/authentication/anonymousAuthentication 
/userName:{{ iis_domain }}\{{ iis_user }} /password:{{ iis_cred }} 
/commit:apphost'

HTH

Jon

On Saturday, November 12, 2016 at 1:31:30 AM UTC, philip shangguan wrote:
>
> I am trying to config .NET application pool and I need to change the 
> "Identity" to use "Custom account" and then enter the user name and 
> password. It seems I can not find the correct attribute names to use in the 
> playbook to have those values set. I tried to search them in: 
>
>
> https://msdn.microsoft.com/en-us/library/microsoft.web.administration.applicationpool_properties(v=vs.90).aspx
>
> but was not successful. This link seems have the right info. but hard to 
> figure out how to add them into the playbook for "attributes"
>
> Thanks,
> Philip
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/034350a6-2ce4-4241-a4f9-c287d45ee42f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to