mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-25 05:10:20 +00:00
Fix: Update notify linting
Latest ansible-lint now requires notifiy pass casing test. * Remove obsolete `listen` in handlers. * Make single notify consistent. Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
parent
96e7fd7718
commit
542df947d5
63 changed files with 95 additions and 138 deletions
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart alertmanager
|
- name: Restart alertmanager
|
||||||
listen: "restart alertmanager"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
@ -9,7 +8,6 @@
|
||||||
register: alertmanager_restarted
|
register: alertmanager_restarted
|
||||||
|
|
||||||
- name: Reload alertmanager
|
- name: Reload alertmanager
|
||||||
listen: "reload alertmanager"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: alertmanager
|
name: alertmanager
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
mode: 0644
|
mode: 0644
|
||||||
validate: "{{ _alertmanager_binary_install_dir }}/amtool check-config %s"
|
validate: "{{ _alertmanager_binary_install_dir }}/amtool check-config %s"
|
||||||
no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
|
no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
|
||||||
notify:
|
notify: Restart alertmanager
|
||||||
- restart alertmanager
|
|
||||||
|
|
||||||
- name: Create systemd service unit
|
- name: Create systemd service unit
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
@ -28,8 +27,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify:
|
notify: Restart alertmanager
|
||||||
- restart alertmanager
|
|
||||||
|
|
||||||
- name: Copy alertmanager template files
|
- name: Copy alertmanager template files
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
|
@ -40,5 +38,4 @@
|
||||||
group: alertmanager
|
group: alertmanager
|
||||||
mode: 0644
|
mode: 0644
|
||||||
with_fileglob: "{{ alertmanager_template_files }}"
|
with_fileglob: "{{ alertmanager_template_files }}"
|
||||||
notify:
|
notify: Restart alertmanager
|
||||||
- restart alertmanager
|
|
||||||
|
|
|
@ -67,8 +67,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- alertmanager
|
- alertmanager
|
||||||
- amtool
|
- amtool
|
||||||
notify:
|
notify: Restart alertmanager
|
||||||
- restart alertmanager
|
|
||||||
|
|
||||||
- name: Propagate locally distributed alertmanager and amtool binaries
|
- name: Propagate locally distributed alertmanager and amtool binaries
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
|
@ -83,5 +82,4 @@
|
||||||
when:
|
when:
|
||||||
- alertmanager_binary_local_dir | length > 0
|
- alertmanager_binary_local_dir | length > 0
|
||||||
- not alertmanager_skip_install
|
- not alertmanager_skip_install
|
||||||
notify:
|
notify: Restart alertmanager
|
||||||
- restart alertmanager
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart bind_exporter
|
- name: Restart bind_exporter
|
||||||
listen: "restart bind_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
notify: restart bind_exporter
|
notify: Restart bind_exporter
|
||||||
|
|
||||||
- name: Create bind_exporter config directory
|
- name: Create bind_exporter config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: '{{ bind_exporter_system_group }}'
|
group: '{{ bind_exporter_system_group }}'
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
notify: restart bind_exporter
|
notify: Restart bind_exporter
|
||||||
|
|
||||||
- name: Allow bind_exporter port in SELinux on RedHat OS family
|
- name: Allow bind_exporter port in SELinux on RedHat OS family
|
||||||
community.general.seport:
|
community.general.seport:
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart bind_exporter
|
notify: Restart bind_exporter
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed bind_exporter binary
|
- name: Propagate locally distributed bind_exporter binary
|
||||||
|
@ -68,4 +68,4 @@
|
||||||
when:
|
when:
|
||||||
- bind_exporter_binary_local_dir | length > 0
|
- bind_exporter_binary_local_dir | length > 0
|
||||||
- not bind_exporter_skip_install
|
- not bind_exporter_skip_install
|
||||||
notify: restart bind_exporter
|
notify: Restart bind_exporter
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart blackbox_exporter
|
- name: Restart blackbox_exporter
|
||||||
listen: "restart blackbox_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
@ -9,7 +8,6 @@
|
||||||
register: blackbox_exporter_restarted
|
register: blackbox_exporter_restarted
|
||||||
|
|
||||||
- name: Reload blackbox_exporter
|
- name: Reload blackbox_exporter
|
||||||
listen: "reload blackbox_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: blackbox_exporter
|
name: blackbox_exporter
|
||||||
|
|
|
@ -6,8 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
notify:
|
notify: Restart blackbox_exporter
|
||||||
- restart blackbox_exporter
|
|
||||||
|
|
||||||
- name: Create blackbox_exporter config directory
|
- name: Create blackbox_exporter config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -24,5 +23,4 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ blackbox_exporter_group }}"
|
group: "{{ blackbox_exporter_group }}"
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
notify:
|
notify: Reload blackbox_exporter
|
||||||
- reload blackbox_exporter
|
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart blackbox_exporter
|
notify: Restart blackbox_exporter
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed blackbox_exporter binary
|
- name: Propagate locally distributed blackbox_exporter binary
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
when:
|
when:
|
||||||
- blackbox_exporter_binary_local_dir | length > 0
|
- blackbox_exporter_binary_local_dir | length > 0
|
||||||
- not blackbox_exporter_skip_install
|
- not blackbox_exporter_skip_install
|
||||||
notify: restart blackbox_exporter
|
notify: Restart blackbox_exporter
|
||||||
|
|
||||||
- name: Install libcap on Debian systems
|
- name: Install libcap on Debian systems
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart cadvisor
|
- name: Restart cadvisor
|
||||||
listen: "restart cadvisor"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart cadvisor
|
notify: Restart cadvisor
|
||||||
|
|
||||||
- name: Allow cadvisor port in SELinux on RedHat OS family
|
- name: Allow cadvisor port in SELinux on RedHat OS family
|
||||||
community.general.seport:
|
community.general.seport:
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart cadvisor
|
notify: Restart cadvisor
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed cadvisor binary
|
- name: Propagate locally distributed cadvisor binary
|
||||||
|
@ -56,4 +56,4 @@
|
||||||
when:
|
when:
|
||||||
- cadvisor_binary_local_dir | length > 0
|
- cadvisor_binary_local_dir | length > 0
|
||||||
- not cadvisor_skip_install
|
- not cadvisor_skip_install
|
||||||
notify: restart cadvisor
|
notify: Restart cadvisor
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart chrony_exporter
|
- name: Restart chrony_exporter
|
||||||
listen: "restart chrony_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart chrony_exporter
|
notify: Restart chrony_exporter
|
||||||
|
|
||||||
- name: Create chrony_exporter config directory
|
- name: Create chrony_exporter config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart chrony_exporter
|
notify: Restart chrony_exporter
|
||||||
|
|
||||||
- name: Allow chrony_exporter port in SELinux on RedHat OS family
|
- name: Allow chrony_exporter port in SELinux on RedHat OS family
|
||||||
community.general.seport:
|
community.general.seport:
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart chrony_exporter
|
notify: Restart chrony_exporter
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed chrony_exporter binary
|
- name: Propagate locally distributed chrony_exporter binary
|
||||||
|
@ -66,4 +66,4 @@
|
||||||
when:
|
when:
|
||||||
- chrony_exporter_binary_local_dir | length > 0
|
- chrony_exporter_binary_local_dir | length > 0
|
||||||
- not chrony_exporter_skip_install
|
- not chrony_exporter_skip_install
|
||||||
notify: restart chrony_exporter
|
notify: Restart chrony_exporter
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart fail2ban_exporter
|
- name: Restart fail2ban_exporter
|
||||||
listen: "restart fail2ban_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart fail2ban_exporter
|
notify: Restart fail2ban_exporter
|
||||||
|
|
||||||
- name: Allow fail2ban_exporter port in SELinux on RedHat OS family
|
- name: Allow fail2ban_exporter port in SELinux on RedHat OS family
|
||||||
community.general.seport:
|
community.general.seport:
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart fail2ban_exporter
|
notify: Restart fail2ban_exporter
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed fail2ban_exporter binary
|
- name: Propagate locally distributed fail2ban_exporter binary
|
||||||
|
@ -48,4 +48,4 @@
|
||||||
when:
|
when:
|
||||||
- fail2ban_exporter_binary_local_dir | length > 0
|
- fail2ban_exporter_binary_local_dir | length > 0
|
||||||
- not fail2ban_exporter_skip_install
|
- not fail2ban_exporter_skip_install
|
||||||
notify: restart fail2ban_exporter
|
notify: Restart fail2ban_exporter
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart ipmi_exporter
|
- name: Restart ipmi_exporter
|
||||||
listen: "restart ipmi_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart ipmi_exporter
|
notify: Restart ipmi_exporter
|
||||||
|
|
||||||
- name: Create ipmi_exporter config directory
|
- name: Create ipmi_exporter config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart ipmi_exporter
|
notify: Restart ipmi_exporter
|
||||||
|
|
||||||
- name: Copy the ipmi_exporter config file
|
- name: Copy the ipmi_exporter config file
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
@ -33,8 +33,7 @@
|
||||||
group: "{{ ipmi_exporter_system_group }}"
|
group: "{{ ipmi_exporter_system_group }}"
|
||||||
mode: 0640
|
mode: 0640
|
||||||
no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
|
no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
|
||||||
notify:
|
notify: Restart ipmi_exporter
|
||||||
- restart ipmi_exporter
|
|
||||||
|
|
||||||
- name: Allow ipmi_exporter port in SELinux on RedHat OS family
|
- name: Allow ipmi_exporter port in SELinux on RedHat OS family
|
||||||
community.general.seport:
|
community.general.seport:
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart ipmi_exporter
|
notify: Restart ipmi_exporter
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed ipmi_exporter binary
|
- name: Propagate locally distributed ipmi_exporter binary
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
when:
|
when:
|
||||||
- ipmi_exporter_binary_local_dir | length > 0
|
- ipmi_exporter_binary_local_dir | length > 0
|
||||||
- not ipmi_exporter_skip_install
|
- not ipmi_exporter_skip_install
|
||||||
notify: restart ipmi_exporter
|
notify: Restart ipmi_exporter
|
||||||
|
|
||||||
- name: Install freeipmi package
|
- name: Install freeipmi package
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart memcached_exporter
|
- name: Restart memcached_exporter
|
||||||
listen: "restart memcached_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart memcached_exporter
|
notify: Restart memcached_exporter
|
||||||
|
|
||||||
- name: Create memcached_exporter config directory
|
- name: Create memcached_exporter config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart memcached_exporter
|
notify: Restart memcached_exporter
|
||||||
|
|
||||||
- name: Allow memcached_exporter port in SELinux on RedHat OS family
|
- name: Allow memcached_exporter port in SELinux on RedHat OS family
|
||||||
community.general.seport:
|
community.general.seport:
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart memcached_exporter
|
notify: Restart memcached_exporter
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed memcached_exporter binary
|
- name: Propagate locally distributed memcached_exporter binary
|
||||||
|
@ -66,4 +66,4 @@
|
||||||
when:
|
when:
|
||||||
- memcached_exporter_binary_local_dir | length > 0
|
- memcached_exporter_binary_local_dir | length > 0
|
||||||
- not memcached_exporter_skip_install
|
- not memcached_exporter_skip_install
|
||||||
notify: restart memcached_exporter
|
notify: Restart memcached_exporter
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart mongodb_exporter
|
- name: Restart mongodb_exporter
|
||||||
listen: "restart mongodb_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart mongodb_exporter
|
notify: Restart mongodb_exporter
|
||||||
|
|
||||||
- name: Create mongodb_exporter config directory
|
- name: Create mongodb_exporter config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart mongodb_exporter
|
notify: Restart mongodb_exporter
|
||||||
|
|
||||||
- name: Allow mongodb_exporter port in SELinux on RedHat OS family
|
- name: Allow mongodb_exporter port in SELinux on RedHat OS family
|
||||||
community.general.seport:
|
community.general.seport:
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart mongodb_exporter
|
notify: Restart mongodb_exporter
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed mongodb_exporter binary
|
- name: Propagate locally distributed mongodb_exporter binary
|
||||||
|
@ -66,4 +66,4 @@
|
||||||
when:
|
when:
|
||||||
- mongodb_exporter_binary_local_dir | length > 0
|
- mongodb_exporter_binary_local_dir | length > 0
|
||||||
- not mongodb_exporter_skip_install
|
- not mongodb_exporter_skip_install
|
||||||
notify: restart mongodb_exporter
|
notify: Restart mongodb_exporter
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart mysqld_exporter
|
- name: Restart mysqld_exporter
|
||||||
listen: "restart mysqld_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
notify: restart mysqld_exporter
|
notify: Restart mysqld_exporter
|
||||||
|
|
||||||
- name: Create mysqld_exporter config directory
|
- name: Create mysqld_exporter config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
group: '{{ mysqld_exporter_system_group }}'
|
group: '{{ mysqld_exporter_system_group }}'
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
|
no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
|
||||||
notify: restart mysqld_exporter
|
notify: Restart mysqld_exporter
|
||||||
|
|
||||||
- name: Configure mysqld_exporter web config
|
- name: Configure mysqld_exporter web config
|
||||||
when:
|
when:
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: '{{ mysqld_exporter_system_group }}'
|
group: '{{ mysqld_exporter_system_group }}'
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
notify: restart mysqld_exporter
|
notify: Restart mysqld_exporter
|
||||||
|
|
||||||
- name: Allow mysqld_exporter port in SELinux on RedHat OS family
|
- name: Allow mysqld_exporter port in SELinux on RedHat OS family
|
||||||
community.general.seport:
|
community.general.seport:
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart mysqld_exporter
|
notify: Restart mysqld_exporter
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed mysqld_exporter binary
|
- name: Propagate locally distributed mysqld_exporter binary
|
||||||
|
@ -68,4 +68,4 @@
|
||||||
when:
|
when:
|
||||||
- mysqld_exporter_binary_local_dir | length > 0
|
- mysqld_exporter_binary_local_dir | length > 0
|
||||||
- not mysqld_exporter_skip_install
|
- not mysqld_exporter_skip_install
|
||||||
notify: restart mysqld_exporter
|
notify: Restart mysqld_exporter
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart nginx_exporter
|
- name: Restart nginx_exporter
|
||||||
listen: "restart nginx_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart nginx_exporter
|
notify: Restart nginx_exporter
|
||||||
|
|
||||||
- name: Create nginx_exporter config directory
|
- name: Create nginx_exporter config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart nginx_exporter
|
notify: Restart nginx_exporter
|
||||||
|
|
||||||
- name: Allow nginx_exporter port in SELinux on RedHat OS family
|
- name: Allow nginx_exporter port in SELinux on RedHat OS family
|
||||||
community.general.seport:
|
community.general.seport:
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart nginx_exporter
|
notify: Restart nginx_exporter
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed nginx_exporter binary
|
- name: Propagate locally distributed nginx_exporter binary
|
||||||
|
@ -66,4 +66,4 @@
|
||||||
when:
|
when:
|
||||||
- nginx_exporter_binary_local_dir | length > 0
|
- nginx_exporter_binary_local_dir | length > 0
|
||||||
- not nginx_exporter_skip_install
|
- not nginx_exporter_skip_install
|
||||||
notify: restart nginx_exporter
|
notify: Restart nginx_exporter
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart node_exporter
|
- name: Restart node_exporter
|
||||||
listen: "restart node_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart node_exporter
|
notify: Restart node_exporter
|
||||||
|
|
||||||
- name: Create node_exporter config directory
|
- name: Create node_exporter config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart node_exporter
|
notify: Restart node_exporter
|
||||||
|
|
||||||
- name: Create textfile collector dir
|
- name: Create textfile collector dir
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart node_exporter
|
notify: Restart node_exporter
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed node_exporter binary
|
- name: Propagate locally distributed node_exporter binary
|
||||||
|
@ -66,4 +66,4 @@
|
||||||
when:
|
when:
|
||||||
- node_exporter_binary_local_dir | length > 0
|
- node_exporter_binary_local_dir | length > 0
|
||||||
- not node_exporter_skip_install
|
- not node_exporter_skip_install
|
||||||
notify: restart node_exporter
|
notify: Restart node_exporter
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart postgres_exporter
|
- name: Restart postgres_exporter
|
||||||
listen: "restart postgres_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
notify: restart postgres_exporter
|
notify: Restart postgres_exporter
|
||||||
|
|
||||||
- name: Create postgres_exporter config directory
|
- name: Create postgres_exporter config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
group: '{{ postgres_exporter_system_group }}'
|
group: '{{ postgres_exporter_system_group }}'
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
# no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
|
# no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
|
||||||
notify: restart postgres_exporter
|
notify: Restart postgres_exporter
|
||||||
- name: Configure via URI
|
- name: Configure via URI
|
||||||
when: postgres_exporter_uri | length > 0
|
when: postgres_exporter_uri | length > 0
|
||||||
block:
|
block:
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: '{{ postgres_exporter_system_group }}'
|
group: '{{ postgres_exporter_system_group }}'
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
notify: restart postgres_exporter
|
notify: Restart postgres_exporter
|
||||||
- name: Creating file postgres_exporter_user
|
- name: Creating file postgres_exporter_user
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: "{{ postgres_exporter_config_dir }}/postgres_exporter_user"
|
dest: "{{ postgres_exporter_config_dir }}/postgres_exporter_user"
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: '{{ postgres_exporter_system_group }}'
|
group: '{{ postgres_exporter_system_group }}'
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
notify: restart postgres_exporter
|
notify: Restart postgres_exporter
|
||||||
- name: Creating file postgres_exporter_pass
|
- name: Creating file postgres_exporter_pass
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: "{{ postgres_exporter_config_dir }}/postgres_exporter_pass"
|
dest: "{{ postgres_exporter_config_dir }}/postgres_exporter_pass"
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: '{{ postgres_exporter_system_group }}'
|
group: '{{ postgres_exporter_system_group }}'
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
notify: restart postgres_exporter
|
notify: Restart postgres_exporter
|
||||||
|
|
||||||
- name: Configure postgres_exporter web config
|
- name: Configure postgres_exporter web config
|
||||||
when:
|
when:
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: '{{ postgres_exporter_system_group }}'
|
group: '{{ postgres_exporter_system_group }}'
|
||||||
mode: '0640'
|
mode: '0640'
|
||||||
notify: restart postgres_exporter
|
notify: Restart postgres_exporter
|
||||||
|
|
||||||
- name: Allow postgres_exporter port in SELinux on RedHat OS family
|
- name: Allow postgres_exporter port in SELinux on RedHat OS family
|
||||||
community.general.seport:
|
community.general.seport:
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart postgres_exporter
|
notify: Restart postgres_exporter
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed postgres_exporter binary
|
- name: Propagate locally distributed postgres_exporter binary
|
||||||
|
@ -68,4 +68,4 @@
|
||||||
when:
|
when:
|
||||||
- postgres_exporter_binary_local_dir | length > 0
|
- postgres_exporter_binary_local_dir | length > 0
|
||||||
- not postgres_exporter_skip_install
|
- not postgres_exporter_skip_install
|
||||||
notify: restart postgres_exporter
|
notify: Restart postgres_exporter
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart process_exporter
|
- name: Restart process_exporter
|
||||||
listen: "restart process_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart process_exporter
|
notify: Restart process_exporter
|
||||||
|
|
||||||
- name: Create process_exporter config directory
|
- name: Create process_exporter config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when:
|
when:
|
||||||
- process_exporter_names != []
|
- process_exporter_names != []
|
||||||
notify: restart process_exporter
|
notify: Restart process_exporter
|
||||||
|
|
||||||
- name: Configure process_exporter web config
|
- name: Configure process_exporter web config
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
( process_exporter_tls_server_config | length > 0 ) or
|
( process_exporter_tls_server_config | length > 0 ) or
|
||||||
( process_exporter_http_server_config | length > 0 ) or
|
( process_exporter_http_server_config | length > 0 ) or
|
||||||
( process_exporter_basic_auth_users | length > 0 )
|
( process_exporter_basic_auth_users | length > 0 )
|
||||||
notify: restart process_exporter
|
notify: Restart process_exporter
|
||||||
|
|
||||||
- name: Allow process_exporter port in SELinux on RedHat OS family
|
- name: Allow process_exporter port in SELinux on RedHat OS family
|
||||||
community.general.seport:
|
community.general.seport:
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart process_exporter
|
notify: Restart process_exporter
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed process_exporter binary
|
- name: Propagate locally distributed process_exporter binary
|
||||||
|
@ -66,4 +66,4 @@
|
||||||
when:
|
when:
|
||||||
- process_exporter_binary_local_dir | length > 0
|
- process_exporter_binary_local_dir | length > 0
|
||||||
- not process_exporter_skip_install
|
- not process_exporter_skip_install
|
||||||
notify: restart process_exporter
|
notify: Restart process_exporter
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart prometheus
|
- name: Restart prometheus
|
||||||
listen: "restart prometheus"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
@ -9,7 +8,6 @@
|
||||||
register: prometheus_restarted
|
register: prometheus_restarted
|
||||||
|
|
||||||
- name: Reload prometheus
|
- name: Reload prometheus
|
||||||
listen: "reload prometheus"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: prometheus
|
name: prometheus
|
||||||
|
|
|
@ -10,8 +10,7 @@
|
||||||
when:
|
when:
|
||||||
- prometheus_alert_rules != []
|
- prometheus_alert_rules != []
|
||||||
- not prometheus_agent_mode
|
- not prometheus_agent_mode
|
||||||
notify:
|
notify: Reload prometheus
|
||||||
- reload prometheus
|
|
||||||
|
|
||||||
- name: Copy custom alerting rule files
|
- name: Copy custom alerting rule files
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
|
@ -24,8 +23,7 @@
|
||||||
with_fileglob: "{{ prometheus_alert_rules_files }}"
|
with_fileglob: "{{ prometheus_alert_rules_files }}"
|
||||||
when:
|
when:
|
||||||
- not prometheus_agent_mode
|
- not prometheus_agent_mode
|
||||||
notify:
|
notify: Reload prometheus
|
||||||
- reload prometheus
|
|
||||||
|
|
||||||
- name: Configure prometheus
|
- name: Configure prometheus
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
@ -37,8 +35,7 @@
|
||||||
mode: 0640
|
mode: 0640
|
||||||
validate: "{{ _prometheus_binary_install_dir }}/promtool check config %s"
|
validate: "{{ _prometheus_binary_install_dir }}/promtool check config %s"
|
||||||
no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
|
no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
|
||||||
notify:
|
notify: Reload prometheus
|
||||||
- reload prometheus
|
|
||||||
|
|
||||||
- name: Configure Prometheus web
|
- name: Configure Prometheus web
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
|
|
|
@ -74,8 +74,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- prometheus
|
- prometheus
|
||||||
- promtool
|
- promtool
|
||||||
notify:
|
notify: Restart prometheus
|
||||||
- restart prometheus
|
|
||||||
|
|
||||||
- name: Propagate official console templates
|
- name: Propagate official console templates
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
|
@ -87,8 +86,7 @@
|
||||||
with_items:
|
with_items:
|
||||||
- console_libraries
|
- console_libraries
|
||||||
- consoles
|
- consoles
|
||||||
notify:
|
notify: Restart prometheus
|
||||||
- restart prometheus
|
|
||||||
|
|
||||||
- name: Propagate locally distributed prometheus and promtool binaries
|
- name: Propagate locally distributed prometheus and promtool binaries
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
|
@ -103,8 +101,7 @@
|
||||||
when:
|
when:
|
||||||
- prometheus_binary_local_dir | length > 0
|
- prometheus_binary_local_dir | length > 0
|
||||||
- not prometheus_skip_install
|
- not prometheus_skip_install
|
||||||
notify:
|
notify: Restart prometheus
|
||||||
- restart prometheus
|
|
||||||
|
|
||||||
- name: Create systemd service unit
|
- name: Create systemd service unit
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
@ -113,8 +110,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify:
|
notify: Restart prometheus
|
||||||
- restart prometheus
|
|
||||||
|
|
||||||
- name: Install SELinux dependencies
|
- name: Install SELinux dependencies
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart pushgateway
|
- name: Restart pushgateway
|
||||||
listen: "restart pushgateway"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart pushgateway
|
notify: Restart pushgateway
|
||||||
|
|
||||||
- name: Create pushgateway config directory
|
- name: Create pushgateway config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart pushgateway
|
notify: Restart pushgateway
|
||||||
|
|
||||||
- name: Allow pushgateway port in SELinux on RedHat OS family
|
- name: Allow pushgateway port in SELinux on RedHat OS family
|
||||||
community.general.seport:
|
community.general.seport:
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart pushgateway
|
notify: Restart pushgateway
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed pushgateway binary
|
- name: Propagate locally distributed pushgateway binary
|
||||||
|
@ -66,4 +66,4 @@
|
||||||
when:
|
when:
|
||||||
- pushgateway_binary_local_dir | length > 0
|
- pushgateway_binary_local_dir | length > 0
|
||||||
- not pushgateway_skip_install
|
- not pushgateway_skip_install
|
||||||
notify: restart pushgateway
|
notify: Restart pushgateway
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart redis_exporter
|
- name: Restart redis_exporter
|
||||||
listen: "restart redis_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart redis_exporter
|
notify: Restart redis_exporter
|
||||||
|
|
||||||
- name: Create redis_exporter config directory
|
- name: Create redis_exporter config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart redis_exporter
|
notify: Restart redis_exporter
|
||||||
when: redis_exporter_passwords | length > 0
|
when: redis_exporter_passwords | length > 0
|
||||||
|
|
||||||
- name: Allow redis_exporter port in SELinux on RedHat OS family
|
- name: Allow redis_exporter port in SELinux on RedHat OS family
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart redis_exporter
|
notify: Restart redis_exporter
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed redis_exporter binary
|
- name: Propagate locally distributed redis_exporter binary
|
||||||
|
@ -66,4 +66,4 @@
|
||||||
when:
|
when:
|
||||||
- redis_exporter_binary_local_dir | length > 0
|
- redis_exporter_binary_local_dir | length > 0
|
||||||
- not redis_exporter_skip_install
|
- not redis_exporter_skip_install
|
||||||
notify: restart redis_exporter
|
notify: Restart redis_exporter
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart smartctl_exporter
|
- name: Restart smartctl_exporter
|
||||||
listen: "restart smartctl_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart smartctl_exporter
|
notify: Restart smartctl_exporter
|
||||||
|
|
||||||
- name: Create smartctl_exporter config directory
|
- name: Create smartctl_exporter config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart smartctl_exporter
|
notify: Restart smartctl_exporter
|
||||||
|
|
||||||
- name: Allow smartctl_exporter port in SELinux on RedHat OS family
|
- name: Allow smartctl_exporter port in SELinux on RedHat OS family
|
||||||
community.general.seport:
|
community.general.seport:
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart smartctl_exporter
|
notify: Restart smartctl_exporter
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed smartctl_exporter binary
|
- name: Propagate locally distributed smartctl_exporter binary
|
||||||
|
@ -66,4 +66,4 @@
|
||||||
when:
|
when:
|
||||||
- smartctl_exporter_binary_local_dir | length > 0
|
- smartctl_exporter_binary_local_dir | length > 0
|
||||||
- not smartctl_exporter_skip_install
|
- not smartctl_exporter_skip_install
|
||||||
notify: restart smartctl_exporter
|
notify: Restart smartctl_exporter
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart smokeping_prober
|
- name: Restart smokeping_prober
|
||||||
listen: "restart smokeping_prober"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart smokeping_prober
|
notify: Restart smokeping_prober
|
||||||
|
|
||||||
- name: Create smokeping_prober config directory
|
- name: Create smokeping_prober config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
|
no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
|
||||||
notify: restart smokeping_prober
|
notify: Restart smokeping_prober
|
||||||
|
|
||||||
- name: Configure smokeping_prober web config
|
- name: Configure smokeping_prober web config
|
||||||
when:
|
when:
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart smokeping_prober
|
notify: Restart smokeping_prober
|
||||||
|
|
||||||
- name: Allow smokeping_prober port in SELinux on RedHat OS family
|
- name: Allow smokeping_prober port in SELinux on RedHat OS family
|
||||||
community.general.seport:
|
community.general.seport:
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart smokeping_prober
|
notify: Restart smokeping_prober
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed smokeping_prober binary
|
- name: Propagate locally distributed smokeping_prober binary
|
||||||
|
@ -66,4 +66,4 @@
|
||||||
when:
|
when:
|
||||||
- smokeping_prober_binary_local_dir | length > 0
|
- smokeping_prober_binary_local_dir | length > 0
|
||||||
- not smokeping_prober_skip_install
|
- not smokeping_prober_skip_install
|
||||||
notify: restart smokeping_prober
|
notify: Restart smokeping_prober
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart snmp_exporter
|
- name: Restart snmp_exporter
|
||||||
listen: "restart snmp_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
@ -9,7 +8,6 @@
|
||||||
register: snmp_exporter_restarted
|
register: snmp_exporter_restarted
|
||||||
|
|
||||||
- name: Reload snmp_exporter
|
- name: Reload snmp_exporter
|
||||||
listen: "reload snmp_exporter"
|
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
daemon_reload: true
|
daemon_reload: true
|
||||||
|
|
|
@ -6,8 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify:
|
notify: Restart snmp_exporter
|
||||||
- restart snmp_exporter
|
|
||||||
|
|
||||||
- name: Download snmp configuration file from github repository
|
- name: Download snmp configuration file from github repository
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
|
@ -21,8 +20,7 @@
|
||||||
until: _download_config is success
|
until: _download_config is success
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 2
|
delay: 2
|
||||||
notify:
|
notify: Reload snmp_exporter
|
||||||
- reload snmp_exporter
|
|
||||||
when: not (snmp_exporter_config_file)
|
when: not (snmp_exporter_config_file)
|
||||||
|
|
||||||
- name: Copy configuration file
|
- name: Copy configuration file
|
||||||
|
@ -33,6 +31,5 @@
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
|
no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
|
||||||
notify:
|
notify: Reload snmp_exporter
|
||||||
- reload snmp_exporter
|
|
||||||
when: (snmp_exporter_config_file)
|
when: (snmp_exporter_config_file)
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart snmp_exporter
|
notify: Restart snmp_exporter
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed snmp_exporter binary
|
- name: Propagate locally distributed snmp_exporter binary
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
when:
|
when:
|
||||||
- snmp_exporter_binary_local_dir | length > 0
|
- snmp_exporter_binary_local_dir | length > 0
|
||||||
- not snmp_exporter_skip_install
|
- not snmp_exporter_skip_install
|
||||||
notify: restart snmp_exporter
|
notify: Restart snmp_exporter
|
||||||
|
|
||||||
- name: Create configuration directory
|
- name: Create configuration directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
|
|
@ -5,4 +5,3 @@
|
||||||
name: systemd_exporter
|
name: systemd_exporter
|
||||||
state: restarted
|
state: restarted
|
||||||
become: true
|
become: true
|
||||||
listen: restart systemd_exporter
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart systemd_exporter
|
notify: Restart systemd_exporter
|
||||||
|
|
||||||
- name: Create systemd_exporter config directory
|
- name: Create systemd_exporter config directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
notify: restart systemd_exporter
|
notify: Restart systemd_exporter
|
||||||
|
|
||||||
- name: Allow systemd_exporter port in SELinux on RedHat OS family
|
- name: Allow systemd_exporter port in SELinux on RedHat OS family
|
||||||
community.general.seport:
|
community.general.seport:
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
mode: 0755
|
mode: 0755
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: restart systemd_exporter
|
notify: Restart systemd_exporter
|
||||||
when: not ansible_check_mode
|
when: not ansible_check_mode
|
||||||
|
|
||||||
- name: Propagate locally distributed systemd_exporter binary
|
- name: Propagate locally distributed systemd_exporter binary
|
||||||
|
@ -65,4 +65,4 @@
|
||||||
when:
|
when:
|
||||||
- systemd_exporter_binary_local_dir | length > 0
|
- systemd_exporter_binary_local_dir | length > 0
|
||||||
- not systemd_exporter_skip_install
|
- not systemd_exporter_skip_install
|
||||||
notify: restart systemd_exporter
|
notify: Restart systemd_exporter
|
||||||
|
|
Loading…
Reference in a new issue