From b71253c4af4afb01f3e60752a0db7555dd918f5c Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 7 Sep 2018 16:42:22 +0200 Subject: [PATCH] library/roles/mongodb-org-3.2: Fix the repository gpg key, it changed. --- mongodb-org-3.2/defaults/main.yml | 4 +++- mongodb-org-3.2/tasks/mongodb.yml | 13 +++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/mongodb-org-3.2/defaults/main.yml b/mongodb-org-3.2/defaults/main.yml index 4606da1..0ee86dd 100644 --- a/mongodb-org-3.2/defaults/main.yml +++ b/mongodb-org-3.2/defaults/main.yml @@ -1,6 +1,8 @@ --- mongodb_install_from_external_repo: True -mongodb_repo_key: 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 +mongodb_repo_keys: + - 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 + - EA312927 mongodb_apt_repository: "deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/{{ mongodb_version }} multiverse" mongodb_old_repositories: diff --git a/mongodb-org-3.2/tasks/mongodb.yml b/mongodb-org-3.2/tasks/mongodb.yml index 1746683..4de14d0 100644 --- a/mongodb-org-3.2/tasks/mongodb.yml +++ b/mongodb-org-3.2/tasks/mongodb.yml @@ -17,8 +17,9 @@ tags: mongodb - block: - - name: Install the mongodb apt key - apt_key: keyserver="hkp://keyserver.ubuntu.com:80" id={{ mongodb_repo_key }} state=present + - name: Install the mongodb apt keys + apt_key: keyserver='hkp://keyserver.ubuntu.com:80' id={{ item }} state=present + with_items: '{{ mongodb_repo_keys }}' when: mongodb_install_from_external_repo register: apt_key_update_cache @@ -27,7 +28,7 @@ when: apt_key_update_cache is changed - name: Remove the old mongo apt repositories - apt_repository: repo="{{ item }}" state=absent update_cache=yes + apt_repository: repo='{{ item }}' state=absent update_cache=yes with_items: '{{ mongodb_old_repositories }}' when: mongodb_upgrade_from_older_version @@ -44,7 +45,7 @@ notify: Restart mongodb - name: We are upgrading, install the latest version of the mongodb packages - apt: pkg={{ item }} state=latest + apt: pkg={{ item }} state=latest update_cache=yes cache_valid_time=1800 with_items: '{{ mongodb_server_pkgs }}' when: - mongodb_install_from_external_repo @@ -52,7 +53,7 @@ - mongodb_upgrade_from_older_version - name: Install the mongodb packages - apt: pkg={{ item }} state={{ mongodb_pkg_state }} + apt: pkg={{ item }} state={{ mongodb_pkg_state }} update_cache=yes cache_valid_time=1800 with_items: '{{ mongodb_server_pkgs }}' when: - mongodb_install_from_external_repo @@ -84,7 +85,7 @@ - block: - name: Install the mongodb client packages - apt: pkg={{ item }} state={{ mongodb_pkg_state }} + apt: pkg={{ item }} state={{ mongodb_pkg_state }} update_cache=yes cache_valid_time=1800 with_items: '{{ mongodb_client_pkgs }}' when: not mongodb_install_server