You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- name: Ensure Default Web Site Configurationcommunity.windows.win_iis_website:
name: Default Web Siteapplication_pool: DefaultAppPoolport: 80physical_path: '%SystemDrive%\inetpub\wwwroot'state: started
This task fails even though %SystemDrive%\inetpub\wwwroot does exist once the %SystemDrive% has been expanded. I have this task to ensure the Default Web Site settings haven't been tampered with. The tasks resets them to default values.
- name: Ensure Default Web Site Configurationcommunity.windows.win_iis_website:
name: Default Web Siteapplication_pool: DefaultAppPoolport: 80physical_path: '%SystemDrive%\inetpub\wwwroot'state: started
Use this task in a playbook targeting a Windows 2019 server with IIS installed.
EXPECTED RESULTS
The value of the Default Web Site physical path to be set to %SystemDrive%\inetpub\wwwroot
ACTUAL RESULTS
TASK [iis-config : Ensure Default Web Site Configuration] **************************************************************************************************
task path: /home/ubuntu/edc/roles/iis-config/tasks/main.yml:42
Using module file /usr/lib/python3/dist-packages/ansible_collections/community/windows/plugins/modules/win_iis_website.ps1
Pipelining is enabled.
<10.0.1.12> ESTABLISH WINRM CONNECTION FOR USER: ansible on PORT 5985 TO 10.0.1.12
EXEC (via pipeline wrapper)
fatal: [APP]: FAILED! => {
"changed": false,
"msg": "specified folder must already exist: physical_path",
"site": {}
}
The text was updated successfully, but these errors were encountered:
SUMMARY
This task fails even though
%SystemDrive%\inetpub\wwwroot
does exist once the%SystemDrive%
has been expanded. I have this task to ensure the Default Web Site settings haven't been tampered with. The tasks resets them to default values.ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy
STEPS TO REPRODUCE
Use this task in a playbook targeting a Windows 2019 server with IIS installed.
EXPECTED RESULTS
The value of the
Default Web Site
physical path to be set to%SystemDrive%\inetpub\wwwroot
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: