aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fdio.infra.ansible/nomad.yaml12
-rw-r--r--fdio.infra.ansible/roles/jenkins_job_health_exporter/handlers/main.yaml2
-rw-r--r--fdio.infra.ansible/roles/jenkins_job_health_exporter/tasks/main.yaml12
-rw-r--r--fdio.infra.ansible/roles/prometheus_exporter/defaults/main.yaml8
-rw-r--r--fdio.infra.ansible/roles/prometheus_exporter/meta/main.yaml19
-rw-r--r--fdio.infra.ansible/roles/prometheus_exporter/tasks/main.yaml6
6 files changed, 39 insertions, 20 deletions
diff --git a/fdio.infra.ansible/nomad.yaml b/fdio.infra.ansible/nomad.yaml
index 8dbdac54fe..5a8c4ca4bc 100644
--- a/fdio.infra.ansible/nomad.yaml
+++ b/fdio.infra.ansible/nomad.yaml
@@ -22,9 +22,9 @@
tags: nomad
- role: consul
tags: consul
-# - role: prometheus_exporter
-# tags: prometheus_exporter
-# - role: jenkins_job_health_exporter
-# tags: jenkins_job_health_exporter
-# - role: cleanup
-# tags: cleanup
+ - role: prometheus_exporter
+ tags: prometheus_exporter
+ - role: jenkins_job_health_exporter
+ tags: jenkins_job_health_exporter
+ - role: cleanup
+ tags: cleanup
diff --git a/fdio.infra.ansible/roles/jenkins_job_health_exporter/handlers/main.yaml b/fdio.infra.ansible/roles/jenkins_job_health_exporter/handlers/main.yaml
index 29fee98fed..01849fd92e 100644
--- a/fdio.infra.ansible/roles/jenkins_job_health_exporter/handlers/main.yaml
+++ b/fdio.infra.ansible/roles/jenkins_job_health_exporter/handlers/main.yaml
@@ -2,7 +2,7 @@
# file roles/jenkins_job_health_exporter/handlers/main.yaml
- name: Restart Jenkins Job Health Exporter
- systemd:
+ ansible.builtin.systemd:
daemon_reload: true
enabled: true
name: "jenkins-job-health-exporter"
diff --git a/fdio.infra.ansible/roles/jenkins_job_health_exporter/tasks/main.yaml b/fdio.infra.ansible/roles/jenkins_job_health_exporter/tasks/main.yaml
index 5dbe476019..55cbea92de 100644
--- a/fdio.infra.ansible/roles/jenkins_job_health_exporter/tasks/main.yaml
+++ b/fdio.infra.ansible/roles/jenkins_job_health_exporter/tasks/main.yaml
@@ -2,36 +2,36 @@
# file: roles/jenkins_job_health_exporter/tasks/main.yaml
- name: Conf - Jenkins Job Health Exporter Config
- template:
+ ansible.builtin.template:
src: "templates/jenkins-job-health-exporter.j2"
dest: "/etc/jenkins-job-health-exporter.json"
owner: "root"
group: "root"
mode: "0644"
when:
- - ansible_hostname == "s42-nomad"
+ - ansible_hostname == "s16-nomad"
tags:
- conf-jenkins-job-json
- name: Inst - Jenkins Job Health Exporter Binary
- get_url:
+ ansible.builtin.get_url:
url: "{{ jenkins_job_health_exporter_url }}/{{ jenkins_job_health_exporter_version }}/jenkins-job-health-exporter"
dest: "{{ jenkins_job_health_exporter_target_dir }}/jenkins-job-health-exporter"
mode: "0755"
when:
- - ansible_hostname == "s42-nomad"
+ - ansible_hostname == "s16-nomad"
tags:
- inst-jenkins-job-binary
- name: Inst - Jenkins Job Health Exporter Service
- template:
+ ansible.builtin.template:
src: "templates/jenkins-job-health-exporter.service.j2"
dest: "/lib/systemd/system/jenkins-job-health-exporter.service"
owner: "root"
group: "root"
mode: "0644"
when:
- - ansible_hostname == "s42-nomad"
+ - ansible_hostname == "s16-nomad"
notify:
- "Restart Jenkins Job Health Exporter"
tags:
diff --git a/fdio.infra.ansible/roles/prometheus_exporter/defaults/main.yaml b/fdio.infra.ansible/roles/prometheus_exporter/defaults/main.yaml
index e97ad2b0c7..7291ce0276 100644
--- a/fdio.infra.ansible/roles/prometheus_exporter/defaults/main.yaml
+++ b/fdio.infra.ansible/roles/prometheus_exporter/defaults/main.yaml
@@ -21,11 +21,11 @@ packages_by_arch:
ne_image: "{{ ne_image_by_arch[ansible_machine] }}"
ne_image_by_arch:
- aarch64: "prom/node-exporter:v1.2.0"
- x86_64: "prom/node-exporter:v1.2.0"
+ aarch64: "prom/node-exporter:v1.3.1"
+ x86_64: "prom/node-exporter:v1.3.1"
be_image: "{{ be_image_by_arch[ansible_machine] }}"
be_image_by_arch:
- aarch64: "prom/blackbox-exporter:v0.19.0"
- x86_64: "prom/blackbox-exporter:v0.19.0"
+ aarch64: "prom/blackbox-exporter:v0.21.1"
+ x86_64: "prom/blackbox-exporter:v0.21.1"
diff --git a/fdio.infra.ansible/roles/prometheus_exporter/meta/main.yaml b/fdio.infra.ansible/roles/prometheus_exporter/meta/main.yaml
new file mode 100644
index 0000000000..0ee6c2c224
--- /dev/null
+++ b/fdio.infra.ansible/roles/prometheus_exporter/meta/main.yaml
@@ -0,0 +1,19 @@
+---
+# file: roles/prometheus_exporter/meta/main.yaml
+
+dependencies: [docker]
+
+galaxy_info:
+ role_name: prometheus_exporter
+ author: fd.io
+ description: Prometheus Exporters.
+ company: none
+ license: "license (Apache)"
+ min_ansible_version: 2.9
+ platforms:
+ - name: Ubuntu
+ versions:
+ - focal
+ - jammy
+ galaxy_tags:
+ - prometheus
diff --git a/fdio.infra.ansible/roles/prometheus_exporter/tasks/main.yaml b/fdio.infra.ansible/roles/prometheus_exporter/tasks/main.yaml
index 3fe40f031a..ef9da40175 100644
--- a/fdio.infra.ansible/roles/prometheus_exporter/tasks/main.yaml
+++ b/fdio.infra.ansible/roles/prometheus_exporter/tasks/main.yaml
@@ -2,7 +2,7 @@
# file: roles/prometheus_exporter/tasks/main.yaml
- name: Inst - Update Package Cache (APT)
- apt:
+ ansible.builtin.apt:
update_cache: true
cache_valid_time: 3600
when:
@@ -11,7 +11,7 @@
- prometheus-inst
- name: Inst - Prerequisites
- package:
+ ansible.builtin.package:
name: "{{ packages | flatten(levels=1) }}"
state: latest
tags:
@@ -48,7 +48,7 @@
- prometheus-conf-blackbox-exporter
- name: Conf - Prometheus Blackbox Exporter
- copy:
+ ansible.builtin.copy:
src: "files/blackbox.yml"
dest: "/etc/prometheus/blackbox.yml"
tags: