20
20
delay : 10
21
21
when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
22
22
23
+ - name : Install Oracle EPEL repository
24
+ ansible.builtin.dnf :
25
+ name : oracle-epel-release-el9
26
+ state : present
27
+ retries : 5
28
+ delay : 10
29
+ when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'
30
+
23
31
- name : Install version lock plugin
24
32
ansible.builtin.dnf :
25
33
name : python3-dnf-plugin-versionlock
29
37
delay : 10
30
38
when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
31
39
40
+ - name : Install version lock plugin
41
+ ansible.builtin.dnf :
42
+ name : python3-dnf-plugin-versionlock
43
+ enablerepo : ol9_developer_EPEL
44
+ state : present
45
+ retries : 5
46
+ delay : 10
47
+ when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'
48
+
32
49
- name : Version lock python3-click
33
50
community.general.yum_versionlock :
34
51
state : present
35
52
name : python3-click
53
+ when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
36
54
37
55
- name : Install additional packages for ansible
38
56
ansible.builtin.dnf :
46
64
delay : 10
47
65
when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
48
66
67
+ - name : Install additional packages for ansible
68
+ ansible.builtin.dnf :
69
+ name :
70
+ - python3-psycopg2
71
+ - python3-pyOpenSSL
72
+ - python3-pip
73
+ enablerepo : ol9_developer_EPEL
74
+ state : present
75
+ retries : 5
76
+ delay : 10
77
+ when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'
78
+
49
79
- name : Install pexpect
50
80
ansible.builtin.pip :
51
81
name : pexpect
64
94
65
95
tasks :
66
96
67
- - name : Enable the PostgreSQL 13 module stream
97
+ - name : Enable the PostgreSQL 16 module stream
68
98
ansible.builtin.copy :
69
99
dest : /etc/dnf/modules.d/postgresql.module
70
100
content : |
71
101
[postgresql]
72
102
name=postgresql
73
- stream=13
103
+ stream=16
74
104
profiles=
75
105
state=enabled
76
106
mode : ' 0644'
77
- when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
78
107
79
108
- name : Install the database
80
109
ansible.builtin.dnf :
158
187
name : postgresql
159
188
state : restarted
160
189
161
- - name : Configure OLAM 2.2 hosts
190
+ - name : Configure OLAM 2.3 hosts
162
191
hosts : control,execution
163
192
vars_files :
164
193
- default_vars.yml
168
197
169
198
- name : Install Oracle Linux Automation Manager repository
170
199
ansible.builtin.dnf :
171
- name : oraclelinux-automation-manager-release-el8-2.2
200
+ name : oraclelinux-automation-manager-release-el8
172
201
state : present
173
202
retries : 5
174
203
delay : 10
193
222
mode : ' 0644'
194
223
when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
195
224
196
- - name : Enable Oracle Linux Automation Manager 2.2 repository
225
+ - name : Disable Oracle Linux Automation Manager 2.2 repository
197
226
community.general.ini_file :
198
227
path : " /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo"
199
228
section : ol8_automation2.2
200
229
option : enabled
230
+ value : " 0"
231
+ mode : ' 0644'
232
+ when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
233
+
234
+ - name : Enable Oracle Linux Automation Manager 2.3 repository
235
+ community.general.ini_file :
236
+ path : " /etc/yum.repos.d/oraclelinux-automation-manager-ol8.repo"
237
+ section : ol8_automation2.3
238
+ option : enabled
201
239
value : " 1"
202
240
mode : ' 0644'
203
241
when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
204
242
243
+ - name : Install Oracle Linux Automation Manager repository
244
+ ansible.builtin.dnf :
245
+ name : oraclelinux-automation-manager-release-el9
246
+ state : present
247
+ retries : 5
248
+ delay : 10
249
+ when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'
250
+
251
+ - name : Enable Oracle Linux Automation Manager 2.3 repository
252
+ community.general.ini_file :
253
+ path : " /etc/yum.repos.d/oraclelinux-automation-manager-ol9.repo"
254
+ section : ol9_automation2.3
255
+ option : enabled
256
+ value : " 1"
257
+ mode : ' 0644'
258
+ when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'
259
+
205
260
- name : Install Oracle Linux Automation Manager
206
261
ansible.builtin.dnf :
207
262
name : ol-automation-manager
208
263
state : present
209
264
retries : 5
210
265
delay : 10
211
- when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
212
266
environment : " {{ proxy_env }}"
213
267
214
268
- name : Edit unixsocket in /etc/redis.conf
217
271
regexp : ' ^unixsocket '
218
272
insertafter : ' ^# unixsocketperm '
219
273
line : unixsocket /var/run/redis/redis.sock
274
+ when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
220
275
221
276
- name : Edit unixsocketperm in /etc/redis.conf
222
277
ansible.builtin.lineinfile :
223
278
path : /etc/redis.conf
224
279
regexp : ' ^unixsocketperm '
225
280
insertafter : ' ^unixsocket '
226
281
line : unixsocketperm 775
282
+ when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
283
+
284
+ - name : Edit unixsocket in /etc/redis/redis.conf
285
+ ansible.builtin.lineinfile :
286
+ path : /etc/redis/redis.conf
287
+ regexp : ' ^unixsocket '
288
+ insertafter : ' ^# unixsocketperm '
289
+ line : unixsocket /var/run/redis/redis.sock
290
+ when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'
291
+
292
+ - name : Edit unixsocketperm in /etc/redis/redis.conf
293
+ ansible.builtin.lineinfile :
294
+ path : /etc/redis/redis.conf
295
+ regexp : ' ^unixsocketperm '
296
+ insertafter : ' ^unixsocket '
297
+ line : unixsocketperm 775
298
+ when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'
227
299
228
300
- name : Configure CLUSTER_HOST_ID setting
229
301
ansible.builtin.copy :
239
311
- name : Provision olam ansible container environment # noqa: syntax-check[unknown-module]
240
312
containers.podman.podman_image :
241
313
name : container-registry.oracle.com/oracle_linux_automation_manager/olam-ee
242
- tag : 2.2
314
+ tag : 2.3-ol8
315
+ become : true
316
+ become_user : awx
317
+ retries : 5
318
+ delay : 10
319
+ when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
320
+ environment : " {{ proxy_env }}"
321
+
322
+ - name : Provision olam ansible container environment # noqa: syntax-check[unknown-module]
323
+ containers.podman.podman_image :
324
+ name : container-registry.oracle.com/oracle_linux_automation_manager/olam-ee
325
+ tag : 2.3-ol9
243
326
become : true
244
327
become_user : awx
245
328
retries : 5
246
329
delay : 10
330
+ when : ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'
247
331
environment : " {{ proxy_env }}"
248
332
249
333
- name : Generate an OpenSSL private key with a different size (2048 bits)
529
613
enabled : true
530
614
with_items :
531
615
- ol-automation-manager
616
+
617
+ - name : Check if user is lingering
618
+ ansible.builtin.stat :
619
+ path : " /var/lib/systemd/linger/awx"
620
+ register : user_lingering
621
+
622
+ - name : Enable lingering is needed
623
+ ansible.builtin.command : " loginctl enable-linger awx"
624
+ register : linger_result
625
+ changed_when : linger_result.rc == 0
626
+ when : not user_lingering.stat.exists
0 commit comments