-
-
Save Mostafa-Hamdy-Elgiar/edac8d04c5188e4e9a2a158a3f8ab2d3 to your computer and use it in GitHub Desktop.
Ansible playbook to schedule display sleep (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
Add multiple cron jobs in one playbook.