diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml index b228d11d23..8c7933daf2 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml @@ -17,15 +17,13 @@ ## This Section Is For Ansible 2 < 2.10 - name: Gather Facts About Windows Services - win_service_info: - name: IBXDashboard - register: IBXDashboard_service_info + win_service_facts: - name: Ensure IBXDashboard Service Is stopped win_service: name: IBXDashboard state: stopped - when: IBXDashboard_service_info.services | length > 0 + when: "'IBXDashboard' in win_services" - name: Check if incredibuild.conf file exists win_stat: @@ -52,4 +50,4 @@ win_service: name: IBXDashboard state: started - when: IBXDashboard_service_info.services | length > 0 + when: "'IBXDashboard' in win_services"