--- # tasks file for VMSA-2019-0011-Workaround - name: Get the current state of all services vmware_host_service_facts: hostname: '{{ vcenter_hostname }}' esxi_hostname: '{{ inventory_hostname }}' username: '{{ vmware_user }}' password: '{{ vmware_password }}' delegate_to: localhost register: host_service_facts - name: Start SSH Temporarily vmware_host_service_manager: hostname: '{{ vcenter_hostname }}' esxi_hostname: '{{ inventory_hostname }}' username: '{{ vmware_user }}' password: '{{ vmware_password }}' service_name: TSM-SSH state: start delegate_to: localhost when: (ansible_distribution_version == "6.7.0" or ansible_distribution_version == "6.5.0") and not host_service_facts['host_service_facts'][inventory_hostname] | selectattr('key', 'equalto', 'TSM-SSH') | map(attribute='running') | list | first | bool notify: Stop SSH - name: Add ioTrackers to /etc/vmware/hostd/config.xml xml: backup: yes path: /etc/vmware/hostd/config.xml xpath: /config/ioTrackers value: ' false ' when: (ansible_distribution_version == "6.7.0" and ansible_distribution_build|int < 14320388) or (ansible_distribution_version == "6.5.0" and ansible_distribution_build|int < 13932383) notify: Restart hostd vars: ansible_user: '{{ vmware_user }}@{{ ad_domain|upper }}' ansible_password: '{{ vmware_password }}' ansible_connection: paramiko ansible_python_interpreter: /bin/python - name: Remove ioTrackers from /etc/vmware/hostd/config.xml xml: backup: yes path: /etc/vmware/hostd/config.xml xpath: /config/ioTrackers state: absent when: (ansible_distribution_version == "6.7.0" and ansible_distribution_build|int >= 14320388) or (ansible_distribution_version == "6.5.0" and ansible_distribution_build|int >= 13932383) notify: Restart hostd vars: ansible_user: '{{ vmware_user }}@{{ ad_domain|upper }}' ansible_password: '{{ vmware_password }}' ansible_connection: paramiko ansible_python_interpreter: /bin/python