Last active
October 15, 2021 09:33
-
-
Save jage/da057caa29a89cb6d1bfd21e33886b06 to your computer and use it in GitHub Desktop.
Ansible playbook to schedule display sleep (macOS/OS X)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: office-dashboard-terminal | |
become: yes | |
tasks: | |
- name: Ensure displays are up during office hours | |
cron: | |
name="Activate display" | |
minute="0" | |
hour="8" | |
weekday="1-5" | |
job="/usr/bin/pmset displaysleep 0" | |
- name: Ensure displays are down when no one is working | |
cron: | |
name="Disable display" | |
minute="0" | |
hour="18" | |
weekday="1-5" | |
job="/usr/bin/pmset displaysleep 1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment