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

Add retries on apt lock

parent 70cb23c6
No related branches found
No related tags found
No related merge requests found
Showing
with 84 additions and 0 deletions
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
update_cache: yes update_cache: yes
name: "{{ bench_server_packages }}" name: "{{ bench_server_packages }}"
state: latest state: latest
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: ensure configuration directory exists - name: ensure configuration directory exists
file: file:
...@@ -82,6 +85,9 @@ ...@@ -82,6 +85,9 @@
update_cache: yes update_cache: yes
name: docker-ce name: docker-ce
state: latest state: latest
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: generate docker image - name: generate docker image
when: when:
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
update_cache: yes update_cache: yes
name: "{{ bench_worker_packages }}" name: "{{ bench_worker_packages }}"
state: latest state: latest
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: ensure configuration directory exists - name: ensure configuration directory exists
file: file:
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
force_apt_get: true force_apt_get: true
install_recommends: false install_recommends: false
name: celerity-server name: celerity-server
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: config celerity server - name: config celerity server
notify: restart celerity-server notify: restart celerity-server
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
install_recommends: false install_recommends: false
name: "{{ cluster_nodes_packages }}" name: "{{ cluster_nodes_packages }}"
state: present state: present
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 qnet - name: install qnet
when: "'cluster_qnet' in group_names" when: "'cluster_qnet' in group_names"
...@@ -15,6 +18,9 @@ ...@@ -15,6 +18,9 @@
install_recommends: false install_recommends: false
name: "{{ cluster_qnet_packages }}" name: "{{ cluster_qnet_packages }}"
state: present state: present
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: set hacluster password on cluster - name: set hacluster password on cluster
user: user:
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
force_apt_get: true force_apt_get: true
install_recommends: false install_recommends: false
name: "{{ conf_req_packages }}" name: "{{ conf_req_packages }}"
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 online requirements - name: install online requirements
when: not offline_mode | d(false) when: not offline_mode | d(false)
...@@ -19,6 +22,9 @@ ...@@ -19,6 +22,9 @@
force_apt_get: true force_apt_get: true
install_recommends: false install_recommends: false
name: "{{ conf_req_packages_online }}" name: "{{ conf_req_packages_online }}"
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: clone envsetup repository - name: clone envsetup repository
when: not offline_mode | d(false) when: not offline_mode | d(false)
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
- gnupg-agent - gnupg-agent
- lsb-release - lsb-release
- software-properties-common - software-properties-common
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: add docker key - name: add docker key
when: when:
...@@ -33,6 +36,9 @@ ...@@ -33,6 +36,9 @@
name: docker-ce name: docker-ce
state: latest state: latest
update_cache: yes update_cache: yes
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: docker service - name: docker service
when: when:
...@@ -49,5 +55,8 @@ ...@@ -49,5 +55,8 @@
name: python3-docker name: python3-docker
state: latest state: latest
update_cache: yes update_cache: yes
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)
... ...
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
install_recommends: false install_recommends: false
name: kibana name: kibana
state: latest state: latest
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: deploy kibana configuration - name: deploy kibana configuration
template: template:
...@@ -18,6 +21,9 @@ ...@@ -18,6 +21,9 @@
install_recommends: false install_recommends: false
name: apm-server name: apm-server
state: latest state: latest
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: deploy apm-server configuration - name: deploy apm-server configuration
template: template:
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
install_recommends: false install_recommends: false
name: "{{ f2b_packages }}" name: "{{ f2b_packages }}"
state: latest state: latest
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: directories - name: directories
loop: loop:
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
force_apt_get: true force_apt_get: true
install_recommends: false install_recommends: false
name: "{{ ferm_packages }}" name: "{{ ferm_packages }}"
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: configuration - name: configuration
notify: restart ferm notify: restart ferm
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
force_apt_get: true force_apt_get: true
install_recommends: false install_recommends: false
name: "{{ hap_packages }}" name: "{{ hap_packages }}"
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: configure - name: configure
notify: reload haproxy notify: reload haproxy
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
force_apt_get: true force_apt_get: true
install_recommends: false install_recommends: false
name: "{{ init_packages }}" name: "{{ init_packages }}"
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: configure proxy - name: configure proxy
when: proxy_when is not defined or proxy_when != "end" when: proxy_when is not defined or proxy_when != "end"
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
force_apt_get: true force_apt_get: true
install_recommends: false install_recommends: false
name: "{{ server_packages }}" name: "{{ server_packages }}"
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: fetch ssh public key - name: fetch ssh public key
register: root_ssh_pubkey register: root_ssh_pubkey
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
force_apt_get: true force_apt_get: true
install_recommends: false install_recommends: false
name: celerity-workers name: celerity-workers
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: config celerity worker - name: config celerity worker
notify: restart celerity-workers notify: restart celerity-workers
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
install_recommends: false install_recommends: false
name: apt-transport-https name: apt-transport-https
state: latest state: latest
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 elastic GPG key - name: install elastic GPG key
apt_key: apt_key:
...@@ -21,6 +24,9 @@ ...@@ -21,6 +24,9 @@
install_recommends: false install_recommends: false
name: metricbeat name: metricbeat
state: latest state: latest
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 metricbeat configuration - name: install metricbeat configuration
template: template:
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
force_apt_get: true force_apt_get: true
install_recommends: false install_recommends: false
name: "{{ dependencies_packages }}" name: "{{ dependencies_packages }}"
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: start postgresql - name: start postgresql
systemd: systemd:
...@@ -16,6 +19,9 @@ ...@@ -16,6 +19,9 @@
force_apt_get: true force_apt_get: true
install_recommends: false install_recommends: false
name: "{{ manager_packages }}" name: "{{ manager_packages }}"
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: configure domain name in nginx conf - name: configure domain name in nginx conf
notify: restart nginx notify: restart nginx
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
force_apt_get: true force_apt_get: true
install_recommends: false install_recommends: false
name: "{{ monitor_packages }}" name: "{{ monitor_packages }}"
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: set msmonitor account password - name: set msmonitor account password
user: user:
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
force_apt_get: true force_apt_get: true
install_recommends: false install_recommends: false
name: python3-miris-netcapture name: python3-miris-netcapture
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: netcapture config - name: netcapture config
template: template:
......
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
install_recommends: false install_recommends: false
name: "{{ network_packages }}" name: "{{ network_packages }}"
state: present state: present
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: cleanup - name: cleanup
register: network_cleanup_interfaces register: network_cleanup_interfaces
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
install_recommends: false install_recommends: false
name: "{{ nginx_packages }}" name: "{{ nginx_packages }}"
state: present state: present
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: nginx remove default vhost - name: nginx remove default vhost
notify: restart nginx notify: restart nginx
......
...@@ -76,6 +76,9 @@ ...@@ -76,6 +76,9 @@
install_recommends: false install_recommends: false
name: "{{ postfix_packages }}" name: "{{ postfix_packages }}"
state: present state: present
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: ensure postfix is running - name: ensure postfix is running
service: service:
......
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