Prevent sleep while salt is running (a bit hacky)

This commit is contained in:
Adam Goldsmith 2020-02-03 23:18:28 -05:00
parent b9867b06b0
commit e6e24ed9b5

View File

@ -1,6 +1,13 @@
include: include:
- chocolatey - chocolatey
# don't go to sleep, ideally until the salt run finishes
Set standby timeout to 10 hours:
powercfg.set_timeout:
- name: standby
- value: 600 # ten hours should be plenty
- order: 1
{% import_yaml "packages.yaml" as packages %} {% import_yaml "packages.yaml" as packages %}
{% for pkg in packages %} {% for pkg in packages %}
{{ pkg }}: {{ pkg }}:
@ -22,3 +29,9 @@ Upgrade All:
# 'gpupdate /force': # 'gpupdate /force':
# cmd.run # cmd.run
Final Housekeeping:
powercfg.set_timeout: # Reset sleep timeout
- name: standby
- value: 30 # default
- order: last