docs: rewrite README with structured overview and quick start guide
Replaces the minimal project description with a comprehensive README including a component overview table, quick start instructions, common Ansible operations, and links to detailed documentation. Aligns with Red Panda Approval™ standards.
This commit is contained in:
48
ansible/prometheus/alertmanager_deploy.yml
Normal file
48
ansible/prometheus/alertmanager_deploy.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
---
|
||||
- name: Deploy Prometheus Alertmanager with Pushover
|
||||
hosts: ubuntu
|
||||
become: true
|
||||
tasks:
|
||||
- name: Check if host has alertmanager service
|
||||
ansible.builtin.set_fact:
|
||||
has_alertmanager_service: "{{'alertmanager' in services}}"
|
||||
|
||||
- name: Skip hosts without alertmanager service
|
||||
ansible.builtin.meta: end_host
|
||||
when: not has_alertmanager_service
|
||||
|
||||
- name: Install Alertmanager
|
||||
ansible.builtin.apt:
|
||||
name: prometheus-alertmanager
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Create alertmanager config directory
|
||||
ansible.builtin.file:
|
||||
path: /etc/alertmanager
|
||||
state: directory
|
||||
owner: prometheus
|
||||
group: prometheus
|
||||
mode: '750'
|
||||
|
||||
- name: Template alertmanager configuration
|
||||
ansible.builtin.template:
|
||||
src: prometheus/alertmanager.yml
|
||||
dest: /etc/alertmanager/alertmanager.yml
|
||||
owner: prometheus
|
||||
group: prometheus
|
||||
mode: '550'
|
||||
notify: restart alertmanager
|
||||
|
||||
- name: Start and enable Alertmanager service
|
||||
ansible.builtin.systemd:
|
||||
name: prometheus-alertmanager
|
||||
state: started
|
||||
enabled: true
|
||||
daemon_reload: true
|
||||
|
||||
handlers:
|
||||
- name: restart alertmanager
|
||||
ansible.builtin.systemd:
|
||||
name: prometheus-alertmanager
|
||||
state: restarted
|
||||
Reference in New Issue
Block a user