forked from ISTI-ansible-roles/ansible-roles
Force a update-cache after adding an apt gpg key.
This commit is contained in:
parent
d2d855ab06
commit
8b3a2d84e9
|
@ -20,9 +20,14 @@
|
|||
- name: Install the mongodb apt key
|
||||
apt_key: keyserver="hkp://keyserver.ubuntu.com:80" id={{ mongodb_repo_key }} state=present
|
||||
when: mongodb_install_from_external_repo
|
||||
register: apt_key_update_cache
|
||||
|
||||
- name: Update the apt cache after adding a new key
|
||||
apt: update_cache=yes
|
||||
when: apt_key_update_cache is changed
|
||||
|
||||
- name: Remove the old mongo apt repositories
|
||||
apt_repository: repo="{{ item }}" state=absent
|
||||
apt_repository: repo="{{ item }}" state=absent update_cache=yes
|
||||
with_items: '{{ mongodb_old_repositories }}'
|
||||
when: mongodb_upgrade_from_older_version
|
||||
|
||||
|
|
Loading…
Reference in New Issue