# Create a Windows IIS site as an application?

**URL:** <https://forum.ansible.com/t/create-a-windows-iis-site-as-an-application/35797>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [September 29, 2021, 12:41am UTC](https://forum.ansible.com/t/create-a-windows-iis-site-as-an-application/35797 "2021-09-29T00:41:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZillaYT](https://avatars.discourse-cdn.com/v4/letter/z/4da419/32.png) [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Post date:** [September 29, 2021, 12:41am UTC](https://forum.ansible.com/t/create-a-windows-iis-site-as-an-application/35797/1 "2021-09-29T00:41:13Z")

</div>

I read the [win\_iis\_website](https://docs.ansible.com/ansible/latest/collections/community/windows/win_iis_website_module.html) 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

---

<div class="post-metadata">

**Author:** ![ZillaYT](https://avatars.discourse-cdn.com/v4/letter/z/4da419/32.png) [@ZillaYT](https://forum.ansible.com/u/ZillaYT)\
**Post date:** [September 29, 2021, 1:19am UTC](https://forum.ansible.com/t/create-a-windows-iis-site-as-an-application/35797/2 "2021-09-29T01:19:17Z")

</div>

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?
