- pmset: never sleep, no disk sleep, restart after a power cut, wake on network. The Mac had sleep 1 and only stayed up because BlueBubbles runs caffeinate. - Application firewall on, keeping signed software allowed automatically, stealth and block-all off. Hermes's ad hoc signed Python (dashboard on 9119) is allowed explicitly, since an unattended Mac blocks unsigned programs silently. - Local id_ed25519.pub in phil's authorized_keys (already there). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
448 B
YAML
14 lines
448 B
YAML
- name: Read power settings
|
|
ansible.builtin.command: pmset -g custom
|
|
register: pmset_current
|
|
changed_when: false
|
|
check_mode: false
|
|
|
|
- name: Set power settings
|
|
ansible.builtin.command: pmset -a {{ item.key }} {{ item.value }}
|
|
loop: "{{ mac_pmset | dict2items }}"
|
|
when: >-
|
|
(pmset_current.stdout | regex_search('(?m)^\\s*' ~ item.key ~ '\\s+(\\S+)', '\\1')
|
|
| default([''], true) | first) != (item.value | string)
|
|
become: true
|