mongodb: fix the apt tasks.

This commit is contained in:
Andrea Dell'Amico 2019-03-29 13:14:12 +01:00
parent 3a54594c0d
commit 9910c8580f
1 changed files with 3 additions and 6 deletions

View File

@ -49,15 +49,13 @@
- block:
- name: We are upgrading, install the latest version of the mongodb packages
apt: pkg={{ item }} state=latest update_cache=yes cache_valid_time=1800
with_items: '{{ mongodb_server_pkgs }}'
apt: pkg={{ mongodb_server_pkgs }} state=latest update_cache=yes cache_valid_time=1800
when:
- mongodb_install_packages
- mongodb_upgrade_from_older_version
- name: Install the mongodb packages
apt: pkg={{ item }} state={{ mongodb_pkg_state }} update_cache=yes cache_valid_time=1800
with_items: '{{ mongodb_server_pkgs }}'
apt: pkg={{ mongodb_server_pkgs }} state={{ mongodb_pkg_state }} update_cache=yes cache_valid_time=1800
when:
- mongodb_install_packages
@ -87,8 +85,7 @@
- block:
- name: Install the mongodb client packages
apt: pkg={{ item }} state={{ mongodb_pkg_state }} update_cache=yes cache_valid_time=1800
with_items: '{{ mongodb_client_pkgs }}'
apt: pkg={{ mongodb_client_pkgs }} state={{ mongodb_pkg_state }} update_cache=yes cache_valid_time=1800
when: not mongodb_install_server
tags: [ 'mongodb', 'mongodb_client' ]