mirror of
https://git.ecdf.ed.ac.uk/win_automation/windows-ansible.git
synced 2026-10-31 14:00: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
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user