Update inventory, prometheus-clients.yml
This commit is contained in:
parent
78729dc03f
commit
712b818344
@ -4,20 +4,9 @@ debianservers:
|
|||||||
ansible_user: jas
|
ansible_user: jas
|
||||||
ansible_host: hyperreal.headscale.moonshadow.dev
|
ansible_host: hyperreal.headscale.moonshadow.dev
|
||||||
ansible_python_interpreter: /usr/bin/python3
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
auxnc-8g:
|
rpi400:
|
||||||
ansible_user: jas
|
ansible_user: root
|
||||||
ansible_host: auxnc-8g
|
ansible_host: rpi400.headscale.moonshadow.dev
|
||||||
ansible_python_interpreter: /usr/bin/python3
|
|
||||||
headscale:
|
|
||||||
ansible_user: jas
|
|
||||||
ansible_host: headscale.headscale.moonshadow.dev
|
|
||||||
ansible_python_interpreter: /usr/bin/python3
|
|
||||||
|
|
||||||
almaservers:
|
|
||||||
hosts:
|
|
||||||
archive-warror:
|
|
||||||
ansible_user: jas
|
|
||||||
ansible_host: archive-warrior.headscale.moonshadow.dev
|
|
||||||
ansible_python_interpreter: /usr/bin/python3
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
|
|
||||||
freebsdservers:
|
freebsdservers:
|
||||||
@ -26,6 +15,10 @@ freebsdservers:
|
|||||||
ansible_user: jas
|
ansible_user: jas
|
||||||
ansible_host: nas.headscale.moonshadow.dev
|
ansible_host: nas.headscale.moonshadow.dev
|
||||||
ansible_python_interpreter: /usr/local/bin/python3
|
ansible_python_interpreter: /usr/local/bin/python3
|
||||||
|
moonshadow:
|
||||||
|
ansible_user: jas
|
||||||
|
ansible_host: moonshadow.headscale.moonshadow.dev
|
||||||
|
ansible_python_interpreter: /usr/local/bin/python3
|
||||||
|
|
||||||
promservers:
|
promservers:
|
||||||
hosts:
|
hosts:
|
||||||
@ -37,4 +30,4 @@ promservers:
|
|||||||
promclients:
|
promclients:
|
||||||
children:
|
children:
|
||||||
debianservers:
|
debianservers:
|
||||||
almaservers:
|
freebsdservers:
|
||||||
|
@ -4,3 +4,32 @@
|
|||||||
- name: Import Node Exporter role
|
- name: Import Node Exporter role
|
||||||
import_role:
|
import_role:
|
||||||
name: prometheus.prometheus.node_exporter
|
name: prometheus.prometheus.node_exporter
|
||||||
|
when: ansible_service_mgr == "systemd"
|
||||||
|
|
||||||
|
- name: Install Node Exporter on FreeBSD
|
||||||
|
community.general.pkgng:
|
||||||
|
name: "node_exporter"
|
||||||
|
state: latest
|
||||||
|
when: ansible_service_mgr == "bsdinit"
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Enable node_exporter service on FreeBSD
|
||||||
|
ansible.builtin.shell: sysrc node_exporter_enable="YES"
|
||||||
|
when: ansible_service_mgr == "bsdinit"
|
||||||
|
register: node_exporter_enable
|
||||||
|
become: true
|
||||||
|
changed_when: '"node_exporter_enable: -> YES" in node_exporter_enable.stdout'
|
||||||
|
|
||||||
|
- name: Check if node_exporter service is running on FreeBSD
|
||||||
|
ansible.builtin.shell: service node_exporter status
|
||||||
|
when: ansible_service_mgr == "bsdinit"
|
||||||
|
register: node_exporter_running
|
||||||
|
failed_when: '"node_exporter does not exist" in node_exporter_running.stdout'
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: Start node_exporter service on FreeBSD
|
||||||
|
ansible.builtin.shell: service node_exporter start
|
||||||
|
when:
|
||||||
|
- ansible_service_mgr == "bsdinit"
|
||||||
|
- '"node_exporter is not running" in node_exporter_running.stdout'
|
||||||
|
become: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user