Mac: weekly Hermes update notice on Telegram
Hermes has no auto-update for itself, and /update from Telegram can leave a launchd gateway offline. Instead, a no-agent Hermes cron job runs `hermes update --check` on Mondays at 09:07 and messages Telegram only when a new stable release is out (a failing check sends an error alert). Adds hermes_cron_jobs (scripts in files/hermes-scripts/, copied to ~/.hermes/scripts/; jobs created when missing) so the deal checker can follow the same pattern. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
eff53f2503
commit
2d23b9c470
5 files changed
+60
No files matched your search
@@ -0,0 +1,27 @@
|
||||
- name: Hermes cron scripts
|
||||
ansible.builtin.copy:
|
||||
src: "hermes-scripts/{{ item.script }}"
|
||||
dest: "{{ ansible_user_dir }}/.hermes/scripts/"
|
||||
mode: "0700"
|
||||
loop: "{{ hermes_cron_jobs | selectattr('script', 'defined') }}"
|
||||
loop_control:
|
||||
label: "{{ item.script }}"
|
||||
|
||||
- name: List Hermes cron jobs
|
||||
ansible.builtin.command:
|
||||
argv: ["{{ hermes_cli }}", cron, list, --all]
|
||||
register: hermes_cron_list
|
||||
changed_when: false
|
||||
check_mode: false
|
||||
|
||||
- name: Create missing Hermes cron jobs
|
||||
ansible.builtin.command:
|
||||
argv: >-
|
||||
{{ [hermes_cli, 'cron', 'create', item.schedule, '--name', item.name, '--deliver', item.deliver]
|
||||
+ (['--script', item.script] if item.script is defined else [])
|
||||
+ (['--no-agent'] if item.no_agent | default(false) else [])
|
||||
+ ([item.prompt] if item.prompt is defined else []) }}
|
||||
loop: "{{ hermes_cron_jobs }}"
|
||||
loop_control:
|
||||
label: "{{ item.name }}"
|
||||
when: item.name not in hermes_cron_list.stdout
|
||||
@@ -37,3 +37,7 @@
|
||||
- name: Hermes settings
|
||||
ansible.builtin.import_tasks: hermes-settings.yml
|
||||
tags: hermes-settings
|
||||
|
||||
- name: Hermes cron jobs
|
||||
ansible.builtin.import_tasks: hermes-cron.yml
|
||||
tags: hermes-cron
|
||||
Reference in new issue
Block a user