setting up “physical path credentials to IIS WebApp using win_iis_webapplication” in Ansible

I am trying to create the Webapplication using Ansible with the win_iis_webapplication command. I am unable to set the “physical path credentials” for the site using this command. Could someone help me on how to pass the credentials with the command(win_iis_webapplication).

https://docs.ansible.com/ansible/latest/modules/win_iis_webapplication_module.html

This documentation didn’t provide anything on the “Physical Path Credentials” attribute of the web application.

You probably have to write your own ansible module / role to do it if you don’t see it

Not something I use myself but you might be able to use dsc resources for this - see https://github.com/PowerShell/xWebAdministration

At a push you can probably use ‘appcmd’ although it is fiddly to get the syntax right.

Hope this helps,

Jon