From e946cf1b1d8120b81c83fa2029c08ff77747b170 Mon Sep 17 00:00:00 2001 From: Stewart X Addison Date: Thu, 28 Nov 2024 11:39:16 +0000 Subject: [PATCH 1/2] winPB: Stop using ansible.windows as prefix to tasks Signed-off-by: Stewart X Addison --- .../roles/Incredibuild/tasks/main.yml | 6 +++--- .../roles/MSVS_2022_REDIST/tasks/main.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 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 598e006981..ebadc1bc71 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml @@ -4,12 +4,12 @@ ####################################### - name: Check if the ibxbuild service exists - ansible.windows.win_service_info: + win_service_info: name: IBXDashboard register: service_info - name: Stop the IBX Dashboard service if it exists - ansible.windows.win_service: + win_service: name: IBXDashboard state: stopped when: service_info.exists @@ -28,7 +28,7 @@ when: incredibuild_conf_file.stat.exists - name: Start the IBX Dashboard service if it exists - ansible.windows.win_service: + win_service: name: IBXDashboard state: started when: service_info.exists diff --git a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/MSVS_2022_REDIST/tasks/main.yml b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/MSVS_2022_REDIST/tasks/main.yml index ff4805b2e3..641e56fff4 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/MSVS_2022_REDIST/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/MSVS_2022_REDIST/tasks/main.yml @@ -19,13 +19,13 @@ tags: MSVS_2022_REDIST - name: Check if C:\openjdk\devkit exists - ansible.windows.win_stat: + win_stat: path: 'c:\openjdk\devkit' register: directory_status tags: MSVS_2022_REDIST - name: Create C:\openjdk\devkit if it does not exist - ansible.windows.win_file: + win_file: path: 'c:\openjdk\devkit\' state: directory when: not directory_status.stat.exists From 5aead3f00d3f5269aeb9cfc8830115864af7ca87 Mon Sep 17 00:00:00 2001 From: Stewart X Addison Date: Thu, 28 Nov 2024 12:57:36 +0000 Subject: [PATCH 2/2] Reinstate incredibuild task prefixes and add tags Signed-off-by: Stewart X Addison --- .../roles/Incredibuild/tasks/main.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 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 ebadc1bc71..d9f7f4b60d 100644 --- a/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml +++ b/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/Incredibuild/tasks/main.yml @@ -4,20 +4,23 @@ ####################################### - name: Check if the ibxbuild service exists - win_service_info: + ansible.windows.win_service_info: name: IBXDashboard register: service_info + tags: incredibuild - name: Stop the IBX Dashboard service if it exists - win_service: + ansible.windows.win_service: name: IBXDashboard state: stopped when: service_info.exists + tags: incredibuild - name: Check if incredibuild.conf file exists win_stat: path: 'C:\Program Files (x86)\IncrediBuild\Dashboard\Apache24\conf\incredibuild.conf' register: incredibuild_conf_file + tags: incredibuild - name: Replace APACHE_PORT in incredibuild.conf if file exists win_lineinfile: @@ -26,9 +29,11 @@ line: 'define APACHE_PORT 31000' backup: yes when: incredibuild_conf_file.stat.exists + tags: incredibuild - name: Start the IBX Dashboard service if it exists - win_service: + ansible.windows.win_service: name: IBXDashboard state: started when: service_info.exists + tags: incredibuild