mirror of
https://github.com/wickedyoda/public-setupfiles.git
synced 2026-11-16 13:31:56 -06:00
add playbooks and power shell scripts
add playbooks and power shell scripts
This commit is contained in:
1 parent
377688e218
commit
4d5c390d46
9 files changed
+324
No files matched your search
@@ -0,0 +1,22 @@
|
||||
---
|
||||
- name: Remove shutdown commands and disable sleep and hibernation
|
||||
hosts: windows
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: Hide shutdown-related commands for the Ansible user
|
||||
ansible.windows.win_regedit:
|
||||
path: HKCU:\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
|
||||
name: NoClose
|
||||
data: 1
|
||||
type: dword
|
||||
state: present
|
||||
|
||||
- name: Disable automatic sleep and hibernation timeouts
|
||||
ansible.windows.win_command: "powercfg.exe /change {{ item }} 0"
|
||||
loop:
|
||||
- standby-timeout-ac
|
||||
- standby-timeout-dc
|
||||
- hibernate-timeout-ac
|
||||
- hibernate-timeout-dc
|
||||
changed_when: true
|
||||
Reference in new issue
Block a user