Open felipe-rodriguez-parra opened 8 months ago
The state absent property does not work as expected.
community.windows.win_iis_webapplication
ansible [core 2.15.3] config file = /home/frodriguez/linceweb/ansible.cfg configured module search path = ['/home/frodriguez/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.11/site-packages/ansible ansible collection location = /home/frodriguez/.ansible/collections:/usr/share/ansible/collections executable location = /usr/bin/ansible python version = 3.11.5 (main, Oct 25 2023, 16:19:59) [GCC 8.5.0 20210514 (Red Hat 8.5.0-20)] (/usr/bin/python3.11) jinja version = 3.1.2 libyaml = True
# /usr/lib/python3.11/site-packages/ansible_collections Collection Version ----------------- ------- community.windows 1.13.0
CONFIG_FILE() = /home/frodriguez/linceweb/ansible.cfg DEFAULT_HOST_LIST(/home/frodriguez/linceweb/ansible.cfg) = ['/home/frodriguez/linceweb/inventory'] DEFAULT_LOAD_CALLBACK_PLUGINS(/home/frodriguez/linceweb/ansible.cfg) = True DEFAULT_REMOTE_USER(/home/frodriguez/linceweb/ansible.cfg) = ansible DEFAULT_STDOUT_CALLBACK(/home/frodriguez/linceweb/ansible.cfg) = yaml HOST_KEY_CHECKING(/home/frodriguez/linceweb/ansible.cfg) = False
Ansible master in CentOS and target node Windows Server 2022 (IIS).
iis_path_default: "C:\inetpub\WebCloud\"
# This tasks works properly... like expected - name: Convert to web application Administracion community.windows.win_iis_webapplication: name: "Administration\\Administration.WebAPI.lcloud" application_pool: Administracion connect_as: pass_through physical_path: "{{ iis_path_default }}Administration\\Administration.WebAPI.lcloud" site: WebCloud state: present tags: debug # but this doesn't remove the app in IIS - name: Convert to web application Administracion community.windows.win_iis_webapplication: name: "Administration\\Administration.WebAPI.lcloud" application_pool: Administracion connect_as: pass_through physical_path: "{{ iis_path_default }}Administration\\Administration.WebAPI.lcloud" site: WebCloud state: absent tags: debug
TASK [iis : Convert to web application Administracion] ************************************************************************************************************************************************************************************************************************ task path: /home/frodriguez/linceweb/roles/iis/tasks/main.yaml:68 Using module file /usr/lib/python3.11/site-packages/ansible_collections/community/windows/plugins/modules/win_iis_webapplication.ps1 Pipelining is enabled. <windows.came.com> ESTABLISH WINRM CONNECTION FOR USER: Parkare on PORT 5985 TO windows.came.com EXEC (via pipeline wrapper) changed: [windows.came.com] => changed=true application_pool: Administracion physical_path: C:\inetpub\WebCloud\Administration\Administration.WebAPI.lcloud TASK [iis : Convert to web application Administracion] ************************************************************************************************************************************************************************************************************************ task path: /home/frodriguez/linceweb/roles/iis/tasks/main.yaml:78 Using module file /usr/lib/python3.11/site-packages/ansible_collections/community/windows/plugins/modules/win_iis_webapplication.ps1 Pipelining is enabled. <windows.came.com> ESTABLISH WINRM CONNECTION FOR USER: Parkare on PORT 5985 TO windows.came.com EXEC (via pipeline wrapper) ok: [windows.came.com] => changed=false application_pool: Administracion physical_path: C:\inetpub\WebCloud\Administration\Administration.WebAPI.lcloud
SUMMARY
The state absent property does not work as expected.
ISSUE TYPE
COMPONENT NAME
community.windows.win_iis_webapplication
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Ansible master in CentOS and target node Windows Server 2022 (IIS).
STEPS TO REPRODUCE
iis_path_default: "C:\inetpub\WebCloud\"
ACTUAL RESULTS