forked from usmqe/usmqe-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqe_pre_installation_tasks.yml
94 lines (90 loc) · 2.36 KB
/
qe_pre_installation_tasks.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
#
# Perform auxiliary tasks before installing Tendrl itself:
# * add any additional repo(s) if required, controlled by following variables
# (containing comma separated list of urls pointing to repo config files)
# - additional_repos
# - additional_repos_usm_server
# - additional_repos_usm_nodes
# - additional_repos_usm_client
# * update all packages
# * enable ntp sync via chronyd
#
- hosts: usm_server
remote_user: root
tasks:
- name: Add any additional repo(s)
get_url:
url: "{{ item }}"
dest: "/etc/yum.repos.d/"
retries: 5
delay: 5
register: result
until: 'result is success'
with_items: "{{ (additional_repos_usm_server | default('')).split(',') }}"
when: item != ""
- hosts: usm_nodes
remote_user: root
tasks:
- name: Add any additional repo(s)
get_url:
url: "{{ item }}"
dest: "/etc/yum.repos.d/"
retries: 5
delay: 5
register: result
until: 'result is success'
with_items: "{{ (additional_repos_usm_nodes | default('')).split(',') }}"
when: item != ""
- hosts: usm_client
remote_user: root
tasks:
- name: Add any additional repo(s)
get_url:
url: "{{ item }}"
dest: "/etc/yum.repos.d/"
retries: 5
delay: 5
register: result
until: 'result is success'
with_items: "{{ (additional_repos_usm_client | default('')).split(',') }}"
when: item != ""
- hosts: usm_server:usm_nodes:usm_client
remote_user: root
tasks:
- name: Add any additional repo(s)
get_url:
url: "{{ item }}"
dest: "/etc/yum.repos.d/"
retries: 5
delay: 5
register: result
until: 'result is success'
with_items: "{{ (additional_repos | default('')).split(',') }}"
when: item != ""
- name: upgrade all packages
yum:
name: '*'
state: latest
register: task_result
until: task_result is success
retries: 5
delay: 5
- name: Install chrony
yum:
name: chrony
state: installed
- name: Enable and start chronyd service
service:
name: chronyd
state: started
enabled: yes
- name: Install at
yum:
name: at
state: installed
- name: Enable and start atd service
service:
name: atd
state: started
enabled: yes