- name: Restart Hermes dashboard community.general.launchd: name: "{{ hermes_dashboard_label }}" state: restarted # Nothing to restart in a dry run (on the first deploy the plist isn't there). when: not ansible_check_mode # Lets running turns finish first (unlike launchctl kickstart -k). Without a # terminal it refuses while turns, cron jobs or subagents are running unless # given --yes; the gateway then exits 75 and launchd starts a new one. - name: Restart Hermes gateway ansible.builtin.command: argv: ["{{ hermes_cli }}", gateway, restart, --yes] when: not ansible_check_mode