library/roles/mongodb-org-3.2: Fix the repository gpg key, it changed.

This commit is contained in:
Andrea Dell'Amico 2018-09-07 16:42:22 +02:00
parent 38db7ed0a9
commit b71253c4af
2 changed files with 10 additions and 7 deletions

View File

@ -1,6 +1,8 @@
--- ---
mongodb_install_from_external_repo: True 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_apt_repository: "deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/{{ mongodb_version }} multiverse"
mongodb_old_repositories: mongodb_old_repositories:

View File

@ -17,8 +17,9 @@
tags: mongodb tags: mongodb
- block: - block:
- name: Install the mongodb apt key - name: Install the mongodb apt keys
apt_key: keyserver="hkp://keyserver.ubuntu.com:80" id={{ mongodb_repo_key }} state=present apt_key: keyserver='hkp://keyserver.ubuntu.com:80' id={{ item }} state=present
with_items: '{{ mongodb_repo_keys }}'
when: mongodb_install_from_external_repo when: mongodb_install_from_external_repo
register: apt_key_update_cache register: apt_key_update_cache
@ -27,7 +28,7 @@
when: apt_key_update_cache is changed when: apt_key_update_cache is changed
- name: Remove the old mongo apt repositories - 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 }}' with_items: '{{ mongodb_old_repositories }}'
when: mongodb_upgrade_from_older_version when: mongodb_upgrade_from_older_version
@ -44,7 +45,7 @@
notify: Restart mongodb notify: Restart mongodb
- name: We are upgrading, install the latest version of the mongodb packages - 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 }}' with_items: '{{ mongodb_server_pkgs }}'
when: when:
- mongodb_install_from_external_repo - mongodb_install_from_external_repo
@ -52,7 +53,7 @@
- mongodb_upgrade_from_older_version - mongodb_upgrade_from_older_version
- name: Install the mongodb packages - 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 }}' with_items: '{{ mongodb_server_pkgs }}'
when: when:
- mongodb_install_from_external_repo - mongodb_install_from_external_repo
@ -84,7 +85,7 @@
- block: - block:
- name: Install the mongodb client packages - 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 }}' with_items: '{{ mongodb_client_pkgs }}'
when: not mongodb_install_server when: not mongodb_install_server