Files
windows-ansible/ansible/roles/win_client/tasks/update.yml
T
2025-04-14 18:07:11 +01:00

34 lines
863 B
YAML

---
- 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