mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-22 20:03:04 +00:00
5879df729c
Add a role for the Smokeping Prober. Signed-off-by: SuperQ <superq@gmail.com>
63 lines
1.6 KiB
YAML
63 lines
1.6 KiB
YAML
---
|
|
- name: Preflight
|
|
ansible.builtin.include_tasks:
|
|
file: preflight.yml
|
|
apply:
|
|
tags:
|
|
- smokeping_prober_install
|
|
- smokeping_prober_configure
|
|
- smokeping_prober_run
|
|
tags:
|
|
- smokeping_prober_install
|
|
- smokeping_prober_configure
|
|
- smokeping_prober_run
|
|
|
|
- name: Install
|
|
ansible.builtin.include_tasks:
|
|
file: install.yml
|
|
apply:
|
|
become: true
|
|
tags:
|
|
- smokeping_prober_install
|
|
when:
|
|
( not __smokeping_prober_is_installed.stat.exists ) or
|
|
( (__smokeping_prober_current_version_output.stderr_lines | length > 0)
|
|
and (__smokeping_prober_current_version_output.stderr_lines[0].split(" ")[2] != smokeping_prober_version) ) or
|
|
( (__smokeping_prober_current_version_output.stdout_lines | length > 0)
|
|
and (__smokeping_prober_current_version_output.stdout_lines[0].split(" ")[2] != smokeping_prober_version) ) or
|
|
( smokeping_prober_binary_local_dir | length > 0 )
|
|
tags:
|
|
- smokeping_prober_install
|
|
|
|
- name: SELinux
|
|
ansible.builtin.include_tasks:
|
|
file: selinux.yml
|
|
apply:
|
|
become: true
|
|
tags:
|
|
- smokeping_prober_configure
|
|
when: ansible_selinux.status == "enabled"
|
|
tags:
|
|
- smokeping_prober_configure
|
|
|
|
- name: Configure
|
|
ansible.builtin.include_tasks:
|
|
file: configure.yml
|
|
apply:
|
|
become: true
|
|
tags:
|
|
- smokeping_prober_configure
|
|
tags:
|
|
- smokeping_prober_configure
|
|
|
|
- name: Ensure Smokeping Prober is enabled on boot
|
|
become: true
|
|
ansible.builtin.systemd:
|
|
daemon_reload: true
|
|
name: smokeping_prober
|
|
enabled: true
|
|
state: started
|
|
when:
|
|
- not ansible_check_mode
|
|
tags:
|
|
- smokeping_prober_run
|