Create a Windows IIS site as an application?

I read the win_iis_website docs and am able to create an IIS site. However, the IIS GUI has a text box for “Alias” but the module does not? So how can I add an alias for the site?

Thanks,
Chris

Actually that’s the wrong question.

In the IIS GUI, I can “Add Website” and give it these parameters

  • Alias : Default Web Site
  • Application Pool: DefaultAppPool
  • Physical path: %SystemDrive%\inetpub\wwwroot
  • IP Address: All Unassigned
  • Port: 90
  • Host name: localhost

But when I try to mimic this with Ansible with

  • name: Create Default Web Site
    win_iis_website:
    application_pool: “DefaultAppPool”
    name: “Default Web Site”
    port: “90”
    ip: “*”
    physical_path: “%SystemDrive%\inetpub\wwwroot”
    state: started

I get

TASK [install-site : Install Default IIS site] ************************

fatal: [10.227.26.97]: FAILED! => {“changed”: false, “msg”: “specified folder must already exist: physical_path”, “site”: {}}

What am I missing?