Add retries to all apt commands

This commit is contained in:
Joshua Boniface 2023-09-01 15:42:30 -04:00
parent d54844746e
commit 2ba8f1cfc3
7 changed files with 39 additions and 0 deletions

View File

@ -125,6 +125,9 @@
apt:
update-cache: yes
when: (newhost is defined and newhost) or apt_config.changed or apt_key.changed
register: apt_res
retries: 5
until: apt_res is success
tags: base-apt
- name: aptitude safe upgrade with autoremove
@ -133,6 +136,9 @@
autoremove: yes
upgrade: safe
when: newhost is defined and newhost
register: apt_res
retries: 5
until: apt_res is success
tags: base-apt
- name: install dbus
@ -141,6 +147,9 @@
- dbus
state: latest
when: newhost is defined and newhost
register: apt_res
retries: 5
until: apt_res is success
tags: base-apt
- name: clean out apt cache
@ -165,6 +174,9 @@
state: absent
purge: yes
autoremove: yes
register: apt_res
retries: 5
until: apt_res is success
tags: base-packages
- name: set override debconf selections
@ -178,6 +190,9 @@
name:
- python
when: debian_version|int <= 10
register: apt_res
retries: 5
until: apt_res is success
tags: base-packages
- name: install common packages (bullseye+)
@ -185,6 +200,9 @@
name:
- python-is-python3
when: debian_version|int >= 11
register: apt_res
retries: 5
until: apt_res is success
tags: base-packages
- name: install common packages (all versions)
@ -269,6 +287,9 @@
- plymouth-themes
- linux-image-amd64
- linux-headers-amd64
register: apt_res
retries: 5
until: apt_res is success
tags: base-packages
- name: install cleanup scripts

View File

@ -8,6 +8,9 @@
- ceph-mgr
- radosgw
state: latest
register: apt_res
retries: 5
until: apt_res is success
- name: add admin users to ceph groups
user:

View File

@ -4,6 +4,9 @@
name:
- frr
state: latest
register: apt_res
retries: 5
until: apt_res is success
- name: install frr configuration
template:

View File

@ -10,6 +10,9 @@
- ceph-common
- libguestfs-tools
state: latest
register: apt_res
retries: 5
until: apt_res is success
- name: add libvirt user to ceph group
user:

View File

@ -24,6 +24,9 @@
name: "{{ package_list }}"
state: latest
update-cache: yes
register: apt_res
retries: 5
until: apt_res is success
- name: stop and disable postgresql
service:

View File

@ -13,6 +13,9 @@
- rinse
state: latest
when: newhost is defined and newhost
register: apt_res
retries: 5
until: apt_res is success
- name: install pvc node daemon configuration
template:

View File

@ -5,6 +5,9 @@
- zookeeper
- zookeeper-bin
state: latest
register: apt_res
retries: 5
until: apt_res is success
- name: install zookeeper configuration
template: