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