mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-25 13:20:22 +00:00
Merge pull request #87 from laurent-indermuehle/lie_add_tags_support_for_included_tasks
fix: tags support for included tasks
This commit is contained in:
commit
927ec4ede4
7 changed files with 85 additions and 7 deletions
|
@ -1,6 +1,12 @@
|
|||
---
|
||||
- name: Preflight
|
||||
ansible.builtin.include_tasks: preflight.yml
|
||||
ansible.builtin.include_tasks:
|
||||
file: preflight.yml
|
||||
apply:
|
||||
tags:
|
||||
- alertmanager_install
|
||||
- alertmanager_configure
|
||||
- alertmanager_run
|
||||
tags:
|
||||
- alertmanager_install
|
||||
- alertmanager_configure
|
||||
|
@ -13,12 +19,16 @@
|
|||
become: true
|
||||
tags:
|
||||
- alertmanager_install
|
||||
tags:
|
||||
- alertmanager_install
|
||||
|
||||
- name: SELinux
|
||||
ansible.builtin.include_tasks:
|
||||
file: selinux.yml
|
||||
apply:
|
||||
become: true
|
||||
tags:
|
||||
- alertmanager_configure
|
||||
when: ansible_selinux.status == "enabled"
|
||||
tags:
|
||||
- alertmanager_configure
|
||||
|
@ -30,6 +40,8 @@
|
|||
become: true
|
||||
tags:
|
||||
- alertmanager_configure
|
||||
tags:
|
||||
- alertmanager_configure
|
||||
|
||||
- name: Ensure alertmanager service is started and enabled
|
||||
become: true
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
---
|
||||
- name: Preflight
|
||||
ansible.builtin.include_tasks: preflight.yml
|
||||
ansible.builtin.include_tasks:
|
||||
file: preflight.yml
|
||||
apply:
|
||||
tags:
|
||||
- blackbox_exporter_install
|
||||
- blackbox_exporter_configure
|
||||
- blackbox_exporter_run
|
||||
tags:
|
||||
- blackbox_exporter_install
|
||||
- blackbox_exporter_configure
|
||||
|
@ -13,6 +19,8 @@
|
|||
become: true
|
||||
tags:
|
||||
- blackbox_exporter_install
|
||||
tags:
|
||||
- blackbox_exporter_install
|
||||
|
||||
- name: Configure
|
||||
ansible.builtin.include_tasks:
|
||||
|
@ -21,6 +29,8 @@
|
|||
become: true
|
||||
tags:
|
||||
- blackbox_exporter_configure
|
||||
tags:
|
||||
- blackbox_exporter_configure
|
||||
|
||||
- name: Ensure blackbox_exporter service is started and enabled
|
||||
become: true
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
---
|
||||
- name: Preflight
|
||||
ansible.builtin.include_tasks: preflight.yml
|
||||
ansible.builtin.include_tasks:
|
||||
file: preflight.yml
|
||||
apply:
|
||||
tags:
|
||||
- mysqld_exporter_install
|
||||
- mysqld_exporter_configure
|
||||
- mysqld_exporter_run
|
||||
tags:
|
||||
- mysqld_exporter_install
|
||||
- mysqld_exporter_configure
|
||||
|
@ -11,6 +17,8 @@
|
|||
file: install.yml
|
||||
apply:
|
||||
become: true
|
||||
tags:
|
||||
- mysqld_exporter_install
|
||||
when:
|
||||
( not __mysqld_exporter_is_installed.stat.exists ) or
|
||||
( (__mysqld_exporter_current_version_output.stderr_lines | length > 0)
|
||||
|
@ -26,6 +34,8 @@
|
|||
file: selinux.yml
|
||||
apply:
|
||||
become: true
|
||||
tags:
|
||||
- mysqld_exporter_configure
|
||||
when: ansible_selinux.status == "enabled"
|
||||
tags:
|
||||
- mysqld_exporter_configure
|
||||
|
@ -37,6 +47,8 @@
|
|||
become: true
|
||||
tags:
|
||||
- mysqld_exporter_configure
|
||||
tags:
|
||||
- mysqld_exporter_configure
|
||||
|
||||
- name: Ensure MySQLd Exporter is enabled on boot
|
||||
become: true
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
---
|
||||
- name: Preflight
|
||||
ansible.builtin.include_tasks: preflight.yml
|
||||
ansible.builtin.include_tasks:
|
||||
file: preflight.yml
|
||||
apply:
|
||||
tags:
|
||||
- node_exporter_install
|
||||
- node_exporter_configure
|
||||
- node_exporter_run
|
||||
tags:
|
||||
- node_exporter_install
|
||||
- node_exporter_configure
|
||||
|
@ -11,6 +17,8 @@
|
|||
file: install.yml
|
||||
apply:
|
||||
become: true
|
||||
tags:
|
||||
- node_exporter_install
|
||||
when:
|
||||
( not __node_exporter_is_installed.stat.exists ) or
|
||||
( (__node_exporter_current_version_output.stderr_lines | length > 0)
|
||||
|
@ -26,6 +34,8 @@
|
|||
file: selinux.yml
|
||||
apply:
|
||||
become: true
|
||||
tags:
|
||||
- node_exporter_configure
|
||||
when: ansible_selinux.status == "enabled"
|
||||
tags:
|
||||
- node_exporter_configure
|
||||
|
@ -37,6 +47,8 @@
|
|||
become: true
|
||||
tags:
|
||||
- node_exporter_configure
|
||||
tags:
|
||||
- node_exporter_configure
|
||||
|
||||
- name: Ensure Node Exporter is enabled on boot
|
||||
become: true
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
---
|
||||
- name: Preflight
|
||||
ansible.builtin.include_tasks: preflight.yml
|
||||
ansible.builtin.include_tasks:
|
||||
file: preflight.yml
|
||||
apply:
|
||||
tags:
|
||||
- prometheus_configure
|
||||
- prometheus_install
|
||||
- prometheus_run
|
||||
tags:
|
||||
- prometheus_configure
|
||||
- prometheus_install
|
||||
|
@ -13,6 +19,8 @@
|
|||
become: true
|
||||
tags:
|
||||
- prometheus_install
|
||||
tags:
|
||||
- prometheus_install
|
||||
|
||||
- name: Configure
|
||||
ansible.builtin.include_tasks:
|
||||
|
@ -21,6 +29,8 @@
|
|||
become: true
|
||||
tags:
|
||||
- prometheus_configure
|
||||
tags:
|
||||
- prometheus_configure
|
||||
|
||||
- name: Ensure prometheus service is started and enabled
|
||||
become: true
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
---
|
||||
- name: Preflight
|
||||
ansible.builtin.include_tasks: preflight.yml
|
||||
ansible.builtin.include_tasks:
|
||||
file: preflight.yml
|
||||
apply:
|
||||
tags:
|
||||
- snmp_exporter_install
|
||||
- snmp_exporter_configure
|
||||
- snmp_exporter_run
|
||||
tags:
|
||||
- snmp_exporter_install
|
||||
- snmp_exporter_configure
|
||||
|
@ -13,6 +19,8 @@
|
|||
become: true
|
||||
tags:
|
||||
- snmp_exporter_install
|
||||
tags:
|
||||
- snmp_exporter_install
|
||||
|
||||
- name: Configure
|
||||
ansible.builtin.include_tasks:
|
||||
|
@ -21,6 +29,8 @@
|
|||
become: true
|
||||
tags:
|
||||
- snmp_exporter_configure
|
||||
tags:
|
||||
- snmp_exporter_configure
|
||||
|
||||
- name: Ensure snmp_exporter service is started and enabled
|
||||
become: true
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
---
|
||||
- name: Preflight
|
||||
ansible.builtin.include_tasks: preflight.yml
|
||||
ansible.builtin.include_tasks:
|
||||
file: preflight.yml
|
||||
apply:
|
||||
tags:
|
||||
- systemd_exporter_install
|
||||
- systemd_exporter_configure
|
||||
- systemd_exporter_run
|
||||
tags:
|
||||
- systemd_exporter_install
|
||||
- systemd_exporter_configure
|
||||
|
@ -11,6 +17,8 @@
|
|||
file: install.yml
|
||||
apply:
|
||||
become: true
|
||||
tags:
|
||||
- systemd_exporter_install
|
||||
when:
|
||||
( not __systemd_exporter_is_installed.stat.exists ) or
|
||||
( __systemd_exporter_current_version_output.stderr_lines[0].split(" ")[2] != systemd_exporter_version ) or
|
||||
|
@ -23,6 +31,8 @@
|
|||
file: selinux.yml
|
||||
apply:
|
||||
become: true
|
||||
tags:
|
||||
- systemd_exporter_configure
|
||||
when: ansible_selinux.status == "enabled"
|
||||
tags:
|
||||
- systemd_exporter_configure
|
||||
|
@ -34,6 +44,8 @@
|
|||
become: true
|
||||
tags:
|
||||
- systemd_exporter_configure
|
||||
tags:
|
||||
- systemd_exporter_configure
|
||||
|
||||
- name: Ensure systemd exporter is enabled on boot
|
||||
become: true
|
||||
|
|
Loading…
Reference in a new issue