Files
ansible/roles/mac/tasks/hermes-settings.yml
T
PhilandClaude Opus 5.5 4592ee2132 Mac: start the Podman VM from launchd; settings restart the dashboard too
The VM resize in a92d4c1 worked but left the VM stopped: a VM started from
an Ansible task is stopped when the task ends. Nothing started the VM at
login either, so after a reboot Hermes's sandbox stayed down.

- launchd job local.podman-machine runs `podman machine start` at login;
  the resize now starts the VM through it and waits until it's running.
- Hermes setting changes also restart the dashboard, which keeps its own
  copy of the settings (it kept logging the old /workspace cwd).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 07:23:28 -07:00

26 lines
1.1 KiB
YAML

# `hermes config get` prints the value as YAML (or "Config key not set"), so
# it's compared structurally; `hermes config set` takes JSON for lists and
# booleans. A null value means the key should not be set at all.
- 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', 'unset', item.item.key] if item.item.value is none else
[hermes_cli, 'config', 'set', item.item.key,
item.item.value if item.item.value is string else item.item.value | to_json] }}
loop: "{{ hermes_settings_current.results }}"
loop_control:
label: "{{ item.item.key }} = {{ item.item.value | to_json }}"
when: >-
(none if item.stdout is search('^Config key not set') else item.stdout | from_yaml)
!= item.item.value
# The dashboard is a separate process with its own copy of the settings.
notify: [Restart Hermes gateway, Restart Hermes dashboard]