update stuff

This commit is contained in:
abrown38 committed 2025-04-14 18:07:11 +01:00
1 parent c679ff2f09
commit dbaafbbb38
5 files changed
+188 -4

No files matched your search

+1
View File
@@ -3,3 +3,4 @@
- import_tasks: chocolatey.yml
- import_tasks: rdgw.yml
- import_tasks: start_menu.yml
- import_tasks: update.yml
@@ -7,7 +7,7 @@
- name: Copy start menu to workbench VMs
win_copy:
src: "workbench.xml"
dest: "C:\\eidf\\{{ win_project }}.xml"
dest: "{{ start_menu_xml }}"
force: true
when: inventory_hostname in groups['meta-variant_workbench']
when: groups['meta-variant_workbench'] is defined
@@ -20,7 +20,7 @@
- name: Copy start menu to application VMs
win_copy:
src: "application.xml"
dest: "C:\\eidf\\{{ win_project }}.xml"
dest: "{{ start_menu_xml }}"
force: true
when: inventory_hostname in groups['meta-variant_application']
when: groups['meta-variant_application'] is defined
@@ -33,7 +33,7 @@
- name: Copy start menu to gpu VMs
win_copy:
src: "gpu.xml"
dest: "C:\\eidf\\{{ win_project }}.xml"
dest: "{{ start_menu_xml }}"
force: true
when: inventory_hostname in groups['meta-variant_gpu']
when: groups['meta-variant_gpu'] is defined
+33
View File
@@ -0,0 +1,33 @@
---
- name: Install all updates and reboot as many times as needed
tags: update_windows
ansible.windows.win_updates:
category_names: '*'
reboot: true
- name: Update all choco packages
win_command: choco upgrade all -y
tags: update_choco
- name: Update Start Menu Shortcuts in XML on remote Windows machines
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 }}"
register: output
- name: debug
debug:
var: output