-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
46 lines (39 loc) · 1.1 KB
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
- name: "Getting the netem bundle"
hosts: "control"
become: "false"
tasks:
- name: "Verify That OC client is exist"
command:
cmd: "which oc"
register: rc
failed_when: "rc.rc != 0"
- name: "Verify that OCP is accessiable"
shell:
cmd: "oc get node --kubeconfig {{ kubeconfig }} >/dev/null 2>&1"
register: rc
failed_when: "rc.rc != 0"
- name: "Getting the rpm file"
get_url:
url: "{{ netem_get_pkg }}"
dest: "{{ playbook_dir }}/{{ netem_trg_pkg }}"
mode: "0664"
- name: "Labeling nodes with zone name"
include: zoning.yml
- name: "Enableing Netem"
hosts: "nodes"
remote_user: "core"
tasks:
- name: "Copy the Netem package to the hosts"
copy:
src: "{{ playbook_dir }}/{{ netem_trg_pkg }}"
dest: "/tmp/"
- name: "Copy configuration script"
template:
src: "{{ playbook_dir }}/templates/tcrun.sh.j2"
dest: "/tmp/tcrun.sh"
mode: "0755"
- name: "Setting up latency on the nodes"
become: "true"
command:
cmd: "/tmp/tcrun.sh"