Files
ansible/roles/mac/tasks/hermes-settings.yml
T
PhilandClaude Opus 5.5 eff53f2503 Mac: Hermes settings via hermes config, full pre-update backups
Adds a small hermes_settings map that Ansible checks with
`hermes config get` and fixes with `hermes config set`, leaving the rest
of config.yaml to Hermes (its updates migrate that file).

First setting: updates.pre_update_backup: full (was false), so every
`hermes update` zips ~/.hermes first. Rollback isn't supported once a new
version has written state.db, so the backup is the way back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 06:57:46 -07:00

16 lines
589 B
YAML

- name: Read Hermes settings
ansible.builtin.command:
argv: ["{{ hermes_cli }}", config, get, "{{ item.key }}"]
loop: "{{ hermes_settings | dict2items }}"
register: hermes_settings_current
changed_when: false
check_mode: false
- name: Set Hermes settings
ansible.builtin.command:
argv: ["{{ hermes_cli }}", config, set, "{{ item.item.key }}", "{{ item.item.value }}"]
loop: "{{ hermes_settings_current.results }}"
loop_control:
label: "{{ item.item.key }} = {{ item.item.value }}"
when: (item.stdout_lines | last | default('')) != (item.item.value | string)