diff --git a/roles/baseconfig/tasks/apt-listchanges.yml b/roles/baseconfig/tasks/apt-listchanges.yml index 56925b2..ddfebb7 100644 --- a/roles/baseconfig/tasks/apt-listchanges.yml +++ b/roles/baseconfig/tasks/apt-listchanges.yml @@ -6,6 +6,9 @@ name: apt-listchanges state: present update_cache: true + register: apt_result + retries: 3 + until: apt_result is succeeded # Send email when there is something new - name: Configure apt-listchanges diff --git a/roles/baseconfig/tasks/main.yml b/roles/baseconfig/tasks/main.yml index 27fbd03..807c20d 100644 --- a/roles/baseconfig/tasks/main.yml +++ b/roles/baseconfig/tasks/main.yml @@ -19,6 +19,9 @@ - tree # create a graphical tree of files - ipython # better Python shell - acl # for Ansible become support + register: apt_result + retries: 3 + until: apt_result is succeeded # Pimp my server - name: Customize motd diff --git a/roles/baseconfig/tasks/molly-guard.yml b/roles/baseconfig/tasks/molly-guard.yml index bee8e12..b444b73 100644 --- a/roles/baseconfig/tasks/molly-guard.yml +++ b/roles/baseconfig/tasks/molly-guard.yml @@ -6,6 +6,9 @@ name: molly-guard state: present update_cache: true + register: apt_result + retries: 3 + until: apt_result is succeeded # Always ask for hostname - name: Configure molly-guard diff --git a/roles/codimd/tasks/0_apt_dependencies.yml b/roles/codimd/tasks/0_apt_dependencies.yml index 158c59e..95dec86 100644 --- a/roles/codimd/tasks/0_apt_dependencies.yml +++ b/roles/codimd/tasks/0_apt_dependencies.yml @@ -21,3 +21,6 @@ - npm - build-essential - zlib1g-dev # uws module + register: apt_result + retries: 3 + until: apt_result is succeeded diff --git a/roles/dokuwiki/tasks/main.yml b/roles/dokuwiki/tasks/main.yml index 0da632d..4e1722f 100644 --- a/roles/dokuwiki/tasks/main.yml +++ b/roles/dokuwiki/tasks/main.yml @@ -24,3 +24,6 @@ apt: name: dokuwiki update_cache: true + register: apt_result + retries: 3 + until: apt_result is succeeded diff --git a/roles/etherpad/tasks/0_apt_dependencies.yml b/roles/etherpad/tasks/0_apt_dependencies.yml index 4c8d341..c5995f1 100644 --- a/roles/etherpad/tasks/0_apt_dependencies.yml +++ b/roles/etherpad/tasks/0_apt_dependencies.yml @@ -21,3 +21,6 @@ - git - nodejs - npm + register: apt_result + retries: 3 + until: apt_result is succeeded diff --git a/roles/ldap-client/tasks/0_install_ldap.yml b/roles/ldap-client/tasks/0_install_ldap.yml index 79ceb18..16552a0 100644 --- a/roles/ldap-client/tasks/0_install_ldap.yml +++ b/roles/ldap-client/tasks/0_install_ldap.yml @@ -9,6 +9,9 @@ - nslcd - libnss-ldapd - libpam-ldapd + register: apt_result + retries: 3 + until: apt_result is succeeded # Reduce LDAP load # For the moment it is broken on Stretch when using PHP7.3 diff --git a/roles/ldap-client/tasks/1_group_security.yml b/roles/ldap-client/tasks/1_group_security.yml index 40435d6..c40b466 100644 --- a/roles/ldap-client/tasks/1_group_security.yml +++ b/roles/ldap-client/tasks/1_group_security.yml @@ -11,6 +11,9 @@ package: name: sudo state: present + register: package_result + retries: 3 + until: package_result is succeeded # Set sudo group - name: Configure sudoers diff --git a/roles/ldap-replica/tasks/main.yml b/roles/ldap-replica/tasks/main.yml index 5face6d..4ad968e 100644 --- a/roles/ldap-replica/tasks/main.yml +++ b/roles/ldap-replica/tasks/main.yml @@ -5,6 +5,9 @@ name: slapd state: present update_cache: true + register: apt_result + retries: 3 + until: apt_result is succeeded # What is written after is really not a nice way to install a schema # because the LDAP is being flushed away always... diff --git a/roles/matrix-mxisd/tasks/main.yml b/roles/matrix-mxisd/tasks/main.yml index d58dc22..fae2a84 100644 --- a/roles/matrix-mxisd/tasks/main.yml +++ b/roles/matrix-mxisd/tasks/main.yml @@ -2,6 +2,9 @@ - name: Install mxisd apt: deb: https://github.com/kamax-matrix/mxisd/releases/download/v{{ mxisd_version }}/mxisd_{{ mxisd_version }}_all.deb + register: apt_result + retries: 3 + until: apt_result is succeeded - name: Configure mxisd template: diff --git a/roles/matrix-riot/tasks/main.yml b/roles/matrix-riot/tasks/main.yml index 007a449..04be56f 100644 --- a/roles/matrix-riot/tasks/main.yml +++ b/roles/matrix-riot/tasks/main.yml @@ -4,6 +4,9 @@ apt: name: apt-transport-https update_cache: true + register: apt_result + retries: 3 + until: apt_result is succeeded # Add the repository into source list - name: Configure riot repository @@ -15,17 +18,26 @@ apt_key: url: https://riot.im/packages/debian/repo-key.asc id: E019645248E8F4A1 + register: apt_key_result + retries: 3 + until: apt_key_result is succeeded # Install riot - name: Install riot-web apt: name: riot-web update_cache: true + register: apt_result + retries: 3 + until: apt_result is succeeded # Install nginx - name: Install nginx apt: name: nginx + register: apt_result + retries: 3 + until: apt_result is succeeded # Configure nginx - name: Configure nginx diff --git a/roles/matrix-synapse/tasks/main.yml b/roles/matrix-synapse/tasks/main.yml index 06e44bc..565bc80 100644 --- a/roles/matrix-synapse/tasks/main.yml +++ b/roles/matrix-synapse/tasks/main.yml @@ -4,6 +4,9 @@ name: matrix-synapse update_cache: true default_release: stretch-backports + register: apt_result + retries: 3 + until: apt_result is succeeded - name: Configure matrix-synapse template: diff --git a/roles/nginx-reverse-proxy/tasks/main.yml b/roles/nginx-reverse-proxy/tasks/main.yml index d7a93ee..9ecd403 100644 --- a/roles/nginx-reverse-proxy/tasks/main.yml +++ b/roles/nginx-reverse-proxy/tasks/main.yml @@ -4,6 +4,9 @@ apt: name: nginx update_cache: true + register: apt_result + retries: 3 + until: apt_result is succeeded # Install sites - name: Configure NGINX sites diff --git a/upgrade.yml b/upgrade.yml index f5fbbef..7b28ebe 100644 --- a/upgrade.yml +++ b/upgrade.yml @@ -9,3 +9,6 @@ upgrade: dist update_cache: true cache_valid_time: 86400 # one day + register: apt_result + retries: 3 + until: apt_result is succeeded