Infra: AWS Update to Ubuntu 20.04
[csit.git] / resources / tools / testbed-setup / ansible / roles / jenkins_job_health_exporter / tasks / main.yaml
1 ---
2 # file: roles/jenkins_job_health_exporter/tasks/main.yaml
3
4 - name: Conf - Jenkins Job Health Exporter Config
5   template:
6     src: "templates/jenkins-job-health-exporter.j2"
7     dest: "/etc/jenkins-job-health-exporter.json"
8     owner: "root"
9     group: "root"
10     mode: "0644"
11   when:
12     - ansible_hostname == "s42-nomad"
13   tags:
14     - conf-jenkins-job-json
15
16 - name: Inst - Jenkins Job Health Exporter Binary
17   get_url:
18     url: "{{ jenkins_job_health_exporter_url }}/{{ jenkins_job_health_exporter_version }}/jenkins-job-health-exporter"
19     dest: "{{ jenkins_job_health_exporter_target_dir }}/jenkins-job-health-exporter"
20     mode: "0755"
21   when:
22     - ansible_hostname == "s42-nomad"
23   tags:
24     - inst-jenkins-job-binary
25
26 - name: Inst - Jenkins Job Health Exporter Service
27   template:
28     src: "templates/jenkins-job-health-exporter.service.j2"
29     dest: "/lib/systemd/system/jenkins-job-health-exporter.service"
30     owner: "root"
31     group: "root"
32     mode: "0644"
33   when:
34     - ansible_hostname == "s42-nomad"
35   notify:
36     - "Restart Jenkins Job Health Exporter"
37   tags:
38     - inst-jenkins-job-service