Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Infra: Move probes under ansible instead of terraform
[csit.git]
/
resources
/
tools
/
testbed-setup
/
ansible
/
roles
/
nomad
/
tasks
/
main.yaml
diff --git
a/resources/tools/testbed-setup/ansible/roles/nomad/tasks/main.yaml
b/resources/tools/testbed-setup/ansible/roles/nomad/tasks/main.yaml
index
fa95d64
..
54e8051
100644
(file)
--- a/
resources/tools/testbed-setup/ansible/roles/nomad/tasks/main.yaml
+++ b/
resources/tools/testbed-setup/ansible/roles/nomad/tasks/main.yaml
@@
-1,11
+1,19
@@
---
# file: roles/nomad/tasks/main.yaml
---
# file: roles/nomad/tasks/main.yaml
+- name: Inst - Update Package Cache (APT)
+ apt:
+ update_cache: yes
+ cache_valid_time: 3600
+ when:
+ - ansible_distribution|lower == 'ubuntu'
+ tags:
+ - nomad-inst-prerequisites
+
- name: Inst - Prerequisites
package:
name: "{{ packages | flatten(levels=1) }}"
state: latest
- name: Inst - Prerequisites
package:
name: "{{ packages | flatten(levels=1) }}"
state: latest
- update_cache: true
tags:
- nomad-inst-prerequisites
tags:
- nomad-inst-prerequisites
@@
-30,6
+38,13
@@
tags:
- nomad-conf-user
tags:
- nomad-conf-user
+- name: Inst - Clean Nomad
+ file:
+ path: "{{ nomad_inst_dir }}/nomad"
+ state: "absent"
+ tags:
+ - nomad-inst-package
+
- name: Inst - Download Nomad
get_url:
url: "{{ nomad_zip_url }}"
- name: Inst - Download Nomad
get_url:
url: "{{ nomad_zip_url }}"
@@
-58,13
+73,6
@@
tags:
- nomad-inst-package
tags:
- nomad-inst-package
-- name: Inst - Cleanup
- file:
- path: "{{ nomad_inst_dir }}/nomad"
- state: "absent"
- tags:
- - nomad-inst-package
-
- name: Conf - Create Directories "{{ nomad_data_dir }}"
file:
dest: "{{ nomad_data_dir }}"
- name: Conf - Create Directories "{{ nomad_data_dir }}"
file:
dest: "{{ nomad_data_dir }}"
@@
-137,6
+145,16
@@
tags:
- nomad-conf
tags:
- nomad-conf
+- name: Conf - Telemetry Configuration
+ template:
+ src: telemetry.hcl.j2
+ dest: "{{ nomad_config_dir }}/telemetry.hcl"
+ owner: "{{ nomad_user }}"
+ group: "{{ nomad_group }}"
+ mode: 0644
+ tags:
+ - nomad-conf
+
- name: Conf - Custom Configuration
template:
src: custom.json.j2
- name: Conf - Custom Configuration
template:
src: custom.json.j2