Skip to content

Commit 2b241b9

Browse files
authored
Merge pull request #65 from bgraef/main
add retry and delay to each dnf module call
2 parents 620b907 + dc01eff commit 2b241b9

8 files changed

+40
-4
lines changed

olam/create_instance.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@
320320
name:
321321
- ansible-core
322322
state: present
323+
retries: 5
324+
delay: 10
323325
when:
324326
- inventory_hostname in groups['control']|default([])
325327
- use_olae_only

olam/deploy_olam_single.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@
1616
ansible.builtin.dnf:
1717
name: oracle-epel-release-el8
1818
state: present
19+
retries: 5
20+
delay: 10
1921
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
20-
# when:
21-
# - ansible_facts['distribution_major_version'] == '8'
2222

2323
- name: Install version lock plugin
2424
ansible.builtin.dnf:
2525
name: python3-dnf-plugin-versionlock
2626
enablerepo: ol8_developer_EPEL
2727
state: present
28+
retries: 5
29+
delay: 10
2830
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
2931

3032
- name: Version lock python3-click
@@ -40,6 +42,8 @@
4042
- python3-pip
4143
enablerepo: ol8_developer_EPEL
4244
state: present
45+
retries: 5
46+
delay: 10
4347
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
4448

4549
- name: Install pexpect using pip
@@ -59,13 +63,13 @@
5963
state=enabled
6064
mode: '0644'
6165
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
62-
# when:
63-
# - ansible_distribution_major_version | int >= 8
6466

6567
- name: Install the database
6668
ansible.builtin.dnf:
6769
name: postgresql-server
6870
state: present
71+
retries: 5
72+
delay: 10
6973

7074
- name: Ensure postgresql data directory exists
7175
ansible.builtin.file:
@@ -139,6 +143,8 @@
139143
ansible.builtin.dnf:
140144
name: oraclelinux-automation-manager-release-el8
141145
state: present
146+
retries: 5
147+
delay: 10
142148
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
143149

144150
- name: Disable Oracle Linux Automation Manager 1.0 repository
@@ -172,6 +178,8 @@
172178
ansible.builtin.dnf:
173179
name: ol-automation-manager
174180
state: present
181+
retries: 5
182+
delay: 10
175183
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
176184

177185
- name: Edit unixsocket in /etc/redis.conf

olam/deploy_olam_v1.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@
1616
ansible.builtin.dnf:
1717
name: oracle-epel-release-el8
1818
state: present
19+
retries: 5
20+
delay: 10
1921
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
2022

2123
- name: Install version lock plugin
2224
ansible.builtin.dnf:
2325
name: python3-dnf-plugin-versionlock
2426
enablerepo: ol8_developer_EPEL
2527
state: present
28+
retries: 5
29+
delay: 10
2630
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
2731

2832
- name: Version lock python3-click
@@ -38,6 +42,8 @@
3842
- python3-pip
3943
enablerepo: ol8_developer_EPEL
4044
state: present
45+
retries: 5
46+
delay: 10
4147
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
4248

4349
- name: Install pexpect
@@ -48,6 +54,8 @@
4854
ansible.builtin.dnf:
4955
name: oraclelinux-automation-manager-release-el8
5056
state: present
57+
retries: 5
58+
delay: 10
5159
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
5260

5361
- name: Enable Oracle Linux Automation Manager 1.0 repository
@@ -79,6 +87,8 @@
7987
ansible.builtin.dnf:
8088
name: ol-automation-manager
8189
state: present
90+
retries: 5
91+
delay: 10
8292
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
8393

8494
- name: Edit unixsocket in /etc/redis.conf

olam/provision_builder.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
ansible.builtin.dnf:
1818
name: oraclelinux-automation-manager-release-el8
1919
state: present
20+
retries: 5
21+
delay: 10
2022
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
2123

2224
- name: Disable Oracle Linux Automation Manager 1.0 repository
@@ -52,6 +54,8 @@
5254
- python3.11-ansible-builder
5355
- python3.11-pip
5456
state: present
57+
retries: 5
58+
delay: 10
5559
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
5660

5761
- name: Install Ansible Runner using pip

olam/provision_git_server.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
ansible.builtin.dnf:
2929
name: git
3030
state: present
31+
retries: 5
32+
delay: 10
3133

3234
- name: Create new repo on the git server
3335
ansible.builtin.file:

olam/provision_kvm.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
- cockpit
2323
- cockpit-machines
2424
state: present
25+
retries: 5
26+
delay: 10
2527
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
2628

2729
- name: Install Oracle Linux 9 virtualization packages
@@ -35,6 +37,8 @@
3537
- cockpit
3638
- cockpit-machines
3739
state: present
40+
retries: 5
41+
delay: 10
3842
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '9'
3943

4044
- name: Start and enable Oracle Linux 8 monolithic virtualization services

olam/provision_pah.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
ansible.builtin.dnf:
1818
name: oraclelinux-automation-manager-release-el8
1919
state: present
20+
retries: 5
21+
delay: 10
2022
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
2123

2224
- name: Disable Oracle Linux Automation Manager 1.0 repository
@@ -50,6 +52,8 @@
5052
ansible.builtin.dnf:
5153
name: ol-private-automation-hub-installer
5254
state: present
55+
retries: 5
56+
delay: 10
5357
when: ansible_distribution == 'OracleLinux' and ansible_distribution_major_version == '8'
5458

5559
- name: Copy PAH playbook to home directory

olam/update_all_rpms.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
name: "*"
1818
state: latest
1919
update_only: true
20+
retries: 5
21+
delay: 10
2022
when: ansible_distribution == 'OracleLinux'
2123

2224
- name: Check if a reboot is required

0 commit comments

Comments
 (0)