Skip to content
Snippets Groups Projects
Commit 93d79530 authored by Baptiste DE RENZO's avatar Baptiste DE RENZO
Browse files

Add missing retries on apt lock

parent 5ee4f82e
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,9 @@
update_cache: true
dpkg_options: force-confnew
upgrade: dist
register: apt_status
retries: 60
until: apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)
- name: autoremove current ubuntu
apt:
......@@ -27,6 +30,9 @@
install_recommends: false
autoclean: true
autoremove: true
register: apt_status
retries: 60
until: apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)
- name: list ubicast packages
shell:
......@@ -80,6 +86,9 @@
install_recommends: false
update_cache: true
name: debian-archive-keyring
register: apt_status
retries: 60
until: apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)
- name: upgrade to debian
apt:
......@@ -88,6 +97,9 @@
update_cache: true
dpkg_options: force-confnew
upgrade: dist
register: apt_status
retries: 60
until: apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)
- name: autoremove debian
apt:
......@@ -95,12 +107,18 @@
install_recommends: false
autoclean: true
autoremove: true
register: apt_status
retries: 60
until: apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)
- name: install apt-show-version
apt:
force_apt_get: true
install_recommends: false
name: apt-show-version
register: apt_status
retries: 60
until: apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)
- name: install debian version of packages
shell:
......@@ -113,6 +131,9 @@
update_cache: true
dpkg_options: force-confnew
upgrade: dist
register: apt_status
retries: 60
until: apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)
- name: autoremove
apt:
......@@ -120,5 +141,8 @@
install_recommends: false
autoclean: true
autoremove: true
register: apt_status
retries: 60
until: apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)
...
......@@ -18,6 +18,9 @@
force_apt_get: true
install_recommends: false
name: python3-psycopg2
register: apt_status
retries: 60
until: apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)
roles:
- postgres-ha
......
......@@ -39,6 +39,9 @@
name: nfs-common
state: latest
update_cache: true
register: apt_status
retries: 60
until: apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)
when:
- hostvars.localhost.provisioning == true
......
......@@ -12,6 +12,9 @@
install_recommends: false
cache_valid_time: 3600
upgrade: dist
register: apt_status
retries: 60
until: apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)
- name: yum upgrade
when: ansible_os_family == "RedHat"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment