From 8f449398e949f17855910ec4e67c165d53a3baa8 Mon Sep 17 00:00:00 2001 From: Scott Fryer Date: Wed, 4 Sep 2024 12:18:17 +0100 Subject: [PATCH] Revert "Test Using VPC / Old Ansible" This reverts commit 717dbd87cb4a102327b14771e9f2e7ad3552f146. --- .../roles/Incredibuild/tasks/main.yml | 31 ++++--------------- 1 file changed, 6 insertions(+), 25 deletions(-) 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 8c7933daf2..5547b56a71 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml @@ -8,22 +8,11 @@ name: IBXDashboard register: service_info -## Only available in ansible 2.10 or later -# - name: Stop the IBX Dashboard service if it exists -# ansible.windows.win_service: -# name: IBXDashboard -# state: stopped -# when: service_info.exists - -## This Section Is For Ansible 2 < 2.10 -- name: Gather Facts About Windows Services - win_service_facts: - -- name: Ensure IBXDashboard Service Is stopped - win_service: +- name: Stop the IBX Dashboard service if it exists + ansible.windows.win_service: name: IBXDashboard state: stopped - when: "'IBXDashboard' in win_services" + when: service_info.exists - name: Check if incredibuild.conf file exists win_stat: @@ -38,16 +27,8 @@ backup: yes when: incredibuild_conf_file.stat.exists -## Only available in ansible 2.10 or later -# - name: Start the IBX Dashboard service if it exists -# ansible.windows.win_service: -# name: IBXDashboard -# state: started -# when: service_info.exists - -## This Section Is For Ansible 2 < 2.10 -- name: Ensure IBXDashboard Service Is Started - win_service: +- name: Stop the IBX Dashboard service if it exists + ansible.windows.win_service: name: IBXDashboard state: started - when: "'IBXDashboard' in win_services" + when: service_info.exists