grafana-ansible-collection/roles/grafana_agent/tasks/main.yaml

48 lines
1015 B
YAML
Raw Normal View History

2023-03-03 09:53:02 +01:00
---
2023-03-10 06:45:00 +01:00
- name: Preflight tasks
2023-03-03 09:53:02 +01:00
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
2023-03-10 06:45:00 +01:00
- name: Install tasks
2023-03-03 09:53:02 +01:00
ansible.builtin.include_tasks:
file: install.yaml
apply:
become: true
tags:
- grafana_agent_install
tags:
- grafana_agent_install
when: __grafana_agent_do_install
2023-03-10 06:45:00 +01:00
- name: Configuration tasks
2023-03-03 09:53:02 +01:00
ansible.builtin.include_tasks:
file: configure.yaml
apply:
become: true
tags:
- grafana_agent_configure
tags:
- grafana_agent_configure
2023-03-10 06:45:00 +01:00
- name: Ensure Grafana Agent is started and enabled on boot
2023-03-03 09:53:02 +01:00
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