diff --git a/playbooks/roles/ad_hoc_reporting/tasks/main.yml b/playbooks/roles/ad_hoc_reporting/tasks/main.yml index 4274661bff3..7b679fc8a3d 100644 --- a/playbooks/roles/ad_hoc_reporting/tasks/main.yml +++ b/playbooks/roles/ad_hoc_reporting/tasks/main.yml @@ -32,8 +32,10 @@ url: "https://www.mongodb.org/static/pgp/server-{{ MONGO_VERSION_MAJOR_MINOR }}.asc" state: present retries: 3 + register: add_mongo_signing_key tags: - install:system-requirements + until: add_mongo_signing_key is succeeded - name: add the mongodb repo to the sources list apt_repository: diff --git a/playbooks/roles/mongo_2_6/tasks/main.yml b/playbooks/roles/mongo_2_6/tasks/main.yml index c730f1a92d9..c3b6dfe6ed1 100644 --- a/playbooks/roles/mongo_2_6/tasks/main.yml +++ b/playbooks/roles/mongo_2_6/tasks/main.yml @@ -41,10 +41,12 @@ id: "{{ MONGODB_APT_KEY }}" keyserver: "{{ MONGODB_APT_KEYSERVER }}" state: present + register: add_mongo_signing_key retries: 3 tags: - install - install:base + until: add_mongo_signing_key is succeeded - name: Add the mongodb repo to the sources list apt_repository: diff --git a/playbooks/roles/mongo_3_2/tasks/main.yml b/playbooks/roles/mongo_3_2/tasks/main.yml index 83672f59043..62981d9cf50 100644 --- a/playbooks/roles/mongo_3_2/tasks/main.yml +++ b/playbooks/roles/mongo_3_2/tasks/main.yml @@ -47,9 +47,11 @@ url: "https://www.mongodb.org/static/pgp/server-{{ MONGO_VERSION_MAJOR_MINOR }}.asc" state: present retries: 3 + register: add_mongo_signing_key tags: - "install" - "install:app-requirements" + until: add_mongo_signing_key is succeeded - name: add the mongodb repo to the sources list apt_repository: diff --git a/playbooks/roles/mongo_3_4/tasks/main.yml b/playbooks/roles/mongo_3_4/tasks/main.yml index f16432b6322..10dd2484cdf 100644 --- a/playbooks/roles/mongo_3_4/tasks/main.yml +++ b/playbooks/roles/mongo_3_4/tasks/main.yml @@ -36,9 +36,11 @@ url: "https://www.mongodb.org/static/pgp/server-{{ MONGO_VERSION_MAJOR_MINOR }}.asc" state: present retries: 3 + register: add_mongo_signing_key tags: - "install" - "install:app-requirements" + until: add_mongo_signing_key is succeeded - name: add the mongodb repo to the sources list apt_repository: diff --git a/playbooks/roles/mongo_3_6/tasks/main.yml b/playbooks/roles/mongo_3_6/tasks/main.yml index b7512851884..5a1b83db774 100644 --- a/playbooks/roles/mongo_3_6/tasks/main.yml +++ b/playbooks/roles/mongo_3_6/tasks/main.yml @@ -47,9 +47,11 @@ url: "https://www.mongodb.org/static/pgp/server-{{ MONGO_VERSION_MAJOR_MINOR }}.asc" state: present retries: 3 + register: add_mongo_signing_key tags: - "install" - "install:app-requirements" + until: add_mongo_signing_key is succeeded - name: add the mongodb repo to the sources list apt_repository: diff --git a/playbooks/roles/mongo_4_0/tasks/main.yml b/playbooks/roles/mongo_4_0/tasks/main.yml index 405b2142b6b..ab41799ba60 100644 --- a/playbooks/roles/mongo_4_0/tasks/main.yml +++ b/playbooks/roles/mongo_4_0/tasks/main.yml @@ -47,9 +47,11 @@ url: "https://www.mongodb.org/static/pgp/server-{{ MONGO_VERSION_MAJOR_MINOR }}.asc" state: present retries: 3 + register: add_mongo_signing_key tags: - "install" - "install:app-requirements" + until: add_mongo_signing_key is succeeded - name: add the mongodb repo to the sources list apt_repository: diff --git a/playbooks/roles/mongo_4_2/tasks/main.yml b/playbooks/roles/mongo_4_2/tasks/main.yml index 127a90ae906..a4ede61efb7 100644 --- a/playbooks/roles/mongo_4_2/tasks/main.yml +++ b/playbooks/roles/mongo_4_2/tasks/main.yml @@ -36,9 +36,11 @@ url: "https://www.mongodb.org/static/pgp/server-{{ MONGO_VERSION_MAJOR_MINOR }}.asc" state: present retries: 3 + register: add_mongo_signing_key tags: - "install" - "install:app-requirements" + until: add_mongo_signing_key is succeeded - name: add the mongodb repo to the sources list apt_repository: diff --git a/playbooks/roles/mongo_4_4/tasks/main.yml b/playbooks/roles/mongo_4_4/tasks/main.yml index f16432b6322..10dd2484cdf 100644 --- a/playbooks/roles/mongo_4_4/tasks/main.yml +++ b/playbooks/roles/mongo_4_4/tasks/main.yml @@ -36,9 +36,11 @@ url: "https://www.mongodb.org/static/pgp/server-{{ MONGO_VERSION_MAJOR_MINOR }}.asc" state: present retries: 3 + register: add_mongo_signing_key tags: - "install" - "install:app-requirements" + until: add_mongo_signing_key is succeeded - name: add the mongodb repo to the sources list apt_repository: diff --git a/playbooks/roles/mongo_client/tasks/main.yml b/playbooks/roles/mongo_client/tasks/main.yml index 7f02755ab8f..64c71616169 100644 --- a/playbooks/roles/mongo_client/tasks/main.yml +++ b/playbooks/roles/mongo_client/tasks/main.yml @@ -4,9 +4,11 @@ url: "https://www.mongodb.org/static/pgp/server-{{ MONGO_VERSION_MAJOR_MINOR }}.asc" state: present retries: 3 + register: add_mongo_signing_key tags: - install - install:system-requirements + until: add_mongo_signing_key is succeeded - name: add the mongodb repo to the sources list apt_repository: diff --git a/playbooks/roles/python/tasks/main.yml b/playbooks/roles/python/tasks/main.yml index 490687052e6..9ca64af1723 100644 --- a/playbooks/roles/python/tasks/main.yml +++ b/playbooks/roles/python/tasks/main.yml @@ -16,5 +16,7 @@ - name: Install packages raw: "apt-get install -qq {{ item }}" with_items: "{{ python_packages }}" + register: install_packages retries: 10 delay: 10 + until: install_packages is succeeded