--- - name: Copy start menu to workbench VMs tags: - copy_startmenu - workbench_startmenu block: - name: Copy start menu to workbench VMs win_copy: src: "workbench.xml" dest: "{{ start_menu_xml }}" force: true when: inventory_hostname in groups['meta-variant_workbench'] when: groups['meta-variant_workbench'] is defined - 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: "{{ start_menu_xml }}" force: true when: inventory_hostname in groups['meta-variant_application'] when: groups['meta-variant_application'] is defined - 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: "{{ start_menu_xml }}" force: true when: inventory_hostname in groups['meta-variant_gpu'] when: groups['meta-variant_gpu'] is defined - name: Update Start Menu Shortcutsm tags: update_start_menu block: - name: Copy Python script to target machine ansible.windows.win_template: src: "{{ script_name }}" dest: "{{ script_path }}" force: true - name: Copy current XML to backup location win_copy: remote_src: true src: "{{ start_menu_xml }}" dest: "{{ backup_xml }}" - name: Run Python script on remote machine win_command: python {{ script_path }} - name: Update Group Policy win_shell: gpupdate /force /boot /logoff tags: - client_gpupdate