Skip to content

Commit

Permalink
feat: add hermes update config playbook (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
freak12techno authored Jun 29, 2024
1 parent 3c785d8 commit 96a2d8c
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions playbooks/hermes/01-update-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
- name: Update Hermes config
hosts: "{{ hosts | default('monitoring') }}"

tasks:
- name: Copy Hermes config
ansible.builtin.copy:
src: "../../configs/hermes/{{ inventory_hostname }}.toml"
dest: "{{ ansible_user_dir }}/.hermes/config.toml"
mode: "0755"

- name: Verify Hermes config
ansible.builtin.command: hermes config validate
changed_when: false
register: hermes_config

- name: Print Hermes config validation result
ansible.builtin.debug:
msg:
- "Stdout:"
- "{{ (hermes_config.stdout).split('\n') }}"
- "Stderr:"
- "{{ (hermes_config.stderr).split('\n') }}"

- name: Restart Hermes
become: true
ansible.builtin.systemd:
state: restarted
name: hermes
enabled: true
daemon_reload: true

0 comments on commit 96a2d8c

Please sign in to comment.