0

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.

  • There is no such support inside that module for the attribute you want. Use powershell and `win_shell` instead, or right your own custom module. – 2ps Apr 29 '19 at 00:13

1 Answers1

0
- name: Set user to iis website
  win_shell: set-webconfigurationproperty "system.applicationHost/sites/site[@name='{{ site }}']/application[@path='/']/virtualDirectory[@path='/']" -name username -value {{ site_user }}
- name: Set password to iis website
  win_shell: set-webconfigurationproperty "system.applicationHost/sites/site[@name='{{ site }}']/application[@path='/']/virtualDirectory[@path='/']" -name password -value {{ site_pass }}