Create a Windows IIS site as an application?

40 views
Skip to first unread message

zil...@gmail.com

unread,
Sep 28, 2021, 8:41:13 PM9/28/21
to Ansible Project
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

zil...@gmail.com

unread,
Sep 28, 2021, 9:19:17 PM9/28/21
to Ansible Project
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?
Reply all
Reply to author
Forward
0 new messages