Mac: power settings, firewall, SSH key

- 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>
This commit is contained in:
PhilandClaude Opus 5.5 committed 2026-11-11 06:20:43 -07:00
1 parent f53992d652
commit fe268bd171
6 files changed
+102 -2

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
- 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