From 18a57efbd10e56cfc18d52479874044727fc7ea7 Mon Sep 17 00:00:00 2001 From: abrown38 Date: Fri, 31 May 2024 13:09:22 +0100 Subject: [PATCH] job no longer fails if there are 0 of a client variant (don't like conditionals used should fix) --- .../roles/win_client/files/application.xml | 22 +++++++ ansible/roles/win_client/files/gpu.xml | 22 +++++++ .../win_client/files/start_menu_base.xml | 22 +++++++ ansible/roles/win_client/files/workbench.xml | 63 +++++++------------ ansible/roles/win_client/tasks/start_menu.yml | 44 ++++++++----- 5 files changed, 117 insertions(+), 56 deletions(-) create mode 100644 ansible/roles/win_client/files/application.xml create mode 100644 ansible/roles/win_client/files/gpu.xml create mode 100644 ansible/roles/win_client/files/start_menu_base.xml diff --git a/ansible/roles/win_client/files/application.xml b/ansible/roles/win_client/files/application.xml new file mode 100644 index 0000000..61abf3a --- /dev/null +++ b/ansible/roles/win_client/files/application.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ansible/roles/win_client/files/gpu.xml b/ansible/roles/win_client/files/gpu.xml new file mode 100644 index 0000000..61abf3a --- /dev/null +++ b/ansible/roles/win_client/files/gpu.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ansible/roles/win_client/files/start_menu_base.xml b/ansible/roles/win_client/files/start_menu_base.xml new file mode 100644 index 0000000..61abf3a --- /dev/null +++ b/ansible/roles/win_client/files/start_menu_base.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ansible/roles/win_client/files/workbench.xml b/ansible/roles/win_client/files/workbench.xml index 092f073..61abf3a 100644 --- a/ansible/roles/win_client/files/workbench.xml +++ b/ansible/roles/win_client/files/workbench.xml @@ -1,43 +1,22 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ansible/roles/win_client/tasks/start_menu.yml b/ansible/roles/win_client/tasks/start_menu.yml index 0b2f469..662d8c4 100644 --- a/ansible/roles/win_client/tasks/start_menu.yml +++ b/ansible/roles/win_client/tasks/start_menu.yml @@ -1,31 +1,47 @@ --- -- name: Copy start menu files - tags: copy_startmenu +- name: Copy start menu to workbench VMs + tags: + - copy_startmenu + - workbench_startmenu block: - - name: Copy start menu XML to client VMs + - name: Copy start menu to workbench VMs win_copy: src: "workbench.xml" - dest: "C:\\eidf\\start_menu.xml" + dest: "C:\\eidf\\{{ win_project }}.xml" force: true - tags: workbench_startmenu when: inventory_hostname in groups['meta-variant_workbench'] + when: groups['meta-variant_workbench'] is defined - - name: Copy start menu XML to client VMs +- name: Copy start menu to application VMs + tags: + - copy_startmenu + - application_startmenu + block: + - name: Copy start menu to application VMs win_copy: src: "application.xml" - dest: "C:\\eidf\\start_menu.xml" + dest: "C:\\eidf\\{{ win_project }}.xml" force: true - tags: application_startmenu when: inventory_hostname in groups['meta-variant_application'] + when: groups['meta-variant_application'] is defined - - name: Copy start menu XML to client VMs +- name: Copy start menu to workbench VMs + tags: + - copy_startmenu + - gpu_startmenu + block: + - name: Copy start menu to gpu VMs win_copy: src: "gpu.xml" - dest: "C:\\eidf\\start_menu.xml" + dest: "C:\\eidf\\{{ win_project }}.xml" force: true - tags: gpu_startmenu when: inventory_hostname in groups['meta-variant_gpu'] + when: groups['meta-variant_gpu'] is defined - - name: Update Group Policy - tags: workbench_startmenu - win_shell: gpupdate /force /boot /logoff +- name: Update Group Policy + win_shell: gpupdate /force /boot /logoff + tags: + - copy_startmenu + - workbench_startmenu + - application_startmenu + - gpu_startmenu