grafana-ansible-collection/roles/grafana_agent/tasks/main.yaml
2023-03-10 11:15:00 +05:30

48 lines
1015 B
YAML

---
- name: Preflight tasks
ansible.builtin.include_tasks:
file: preflight.yaml
apply:
become: true
tags:
- grafana_agent_install
- grafana_agent_configure
- grafana_agent_run
tags:
- grafana_agent_install
- grafana_agent_configure
- grafana_agent_run
- name: Install tasks
ansible.builtin.include_tasks:
file: install.yaml
apply:
become: true
tags:
- grafana_agent_install
tags:
- grafana_agent_install
when: __grafana_agent_do_install
- name: Configuration tasks
ansible.builtin.include_tasks:
file: configure.yaml
apply:
become: true
tags:
- grafana_agent_configure
tags:
- grafana_agent_configure
- name: Ensure Grafana Agent is started and enabled on boot
become: true
ansible.builtin.systemd:
daemon_reload: true
name: grafana-agent
enabled: true
state: started
tags:
- grafana_agent_install
- grafana_agent_configure
- grafana_agent_run