mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-30 17:30:15 +00:00
win_update changes
This commit is contained in:
1 parent
66c83a2014
commit
74b5c802a2
5 files changed
+44
-65
No files matched your search
@@ -0,0 +1,34 @@
|
||||
---
|
||||
- name: Update all choco packages
|
||||
tags: update_choco
|
||||
block:
|
||||
- name: Run Chocolatey upgrade (allow failure, don't mark as failed)
|
||||
win_shell: |
|
||||
choco upgrade all -y --ignore-checksums --failonunfound --continue-on-failure
|
||||
register: choco_result
|
||||
ignore_errors: true
|
||||
|
||||
- name: Show Chocolatey output
|
||||
debug:
|
||||
var: choco_result
|
||||
|
||||
- name: Update Start Menu Shortcuts in XML on remote Windows machines
|
||||
tags: update_start_menu
|
||||
block:
|
||||
- name: Copy current XML to backup location
|
||||
win_copy:
|
||||
remote_src: true
|
||||
src: "{{ start_menu_xml }}"
|
||||
dest: "{{ backup_xml }}"
|
||||
force: true
|
||||
|
||||
- name: Run Python script on remote machine
|
||||
win_command: python {{ script_path }}
|
||||
|
||||
rescue:
|
||||
- name: Restore backup XML
|
||||
win_copy:
|
||||
remote_src: true
|
||||
src: "{{ backup_xml }}"
|
||||
dest: "{{ start_menu_xml }}"
|
||||
force: true
|
||||
Reference in new issue
Block a user