win_update changes

This commit is contained in:
abrown38 committed 2025-05-26 09:20:19 +01:00
1 parent 66c83a2014
commit 74b5c802a2
5 files changed
+44 -65

No files matched your search

@@ -43,18 +43,18 @@
block:
- name: Copy Python script to target machine
ansible.windows.win_template:
src: '{{ script_name }}'
dest: '{{ script_path }}'
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 }}'
src: "{{ start_menu_xml }}"
dest: "{{ backup_xml }}"
- name: Run Python script on remote machine
win_command: python "{{ script_path }}"
win_command: python {{ script_path }}
- name: Update Group Policy
win_shell: gpupdate /force /boot /logoff
+2 -2
View File
@@ -3,8 +3,8 @@ import shutil
import re
import xml.etree.ElementTree as ET
original_xml = "{{ start_menu_xml }}"
backup_xml = "{{ backup_xml }}"
original_xml = r"{{ start_menu_xml }}"
backup_xml = r"{{ backup_xml }}"
# This script assumes backup and copying already handled by Ansible