community.windows
community.windows copied to clipboard
win_iis_website: not able to select the correct protocol
SUMMARY
Even if port has been assigned as 443, win_iis_website
module is selecting the http as protocol type.
ISSUE TYPE
- Bug Report
COMPONENT NAME
- win_iis_website
ANSIBLE VERSION
$ pip3 show ansible
Name: ansible
Version: 5.8.0
Summary: Radically simple IT automation
Home-page: https://ansible.com/
Author: Ansible, Inc.
Author-email: [email protected]
License: GPLv3+
Location: /usr/local/lib/python3.8/dist-packages
Requires: ansible-core
Required-by:
COLLECTION VERSION
$ ansible-galaxy collection list community.windows
# /usr/local/lib/python3.8/dist-packages/ansible_collections
Collection Version
----------------- -------
community.windows 1.10.0
CONFIGURATION
- No specific configuration
OS / ENVIRONMENT
- Ubuntu 20.04 LTS
STEPS TO REPRODUCE
- Create a website using the following play:
- name: Create WebApp Application Pool
win_iis_webapppool:
name: WebApp
state: started
attributes:
managedRuntimeVersion: v4.0
autoStart: yes
- name: Create directory structure
win_file:
path: 'D:\MyServer\WebApps'
state: directory
- name: Create MyServer Web Site
win_iis_website:
name: "MyServer"
physical_path: 'D:\MyServer\WebApps'
ip: '*'
port: 443
state: started
application_pool: WebApp
EXPECTED RESULTS
As port has been selected to 443, it should select the https as protocol.
ACTUAL RESULTS
Always its selecting http as a protocol if-respective of port type. Hence there are two options:
- Either there should be a logic to choose the protocol based on the port type
- Or allow a new parameter like protocol to select what to choose between http/http and it should be in sync with the standard port 80/443 respectively