moved task Install/Update the mongodb configuration in a separated task

This commit is contained in:
Roberto Cirillo 2018-09-20 12:01:31 +02:00
parent 53af684ceb
commit 7461a4ee48
1 changed files with 10 additions and 2 deletions

View File

@ -39,11 +39,19 @@
tags: [ 'mongodb', 'mongodb_client', 'mongodb_repo' ]
- block:
- name: Install the mongodb configuration
- name: Install/Update the mongodb configuration
template: src=mongod-{{ mongodb_version }}.conf.j2 dest=/etc/mongod.conf owner=root group=root mode=0444 backup=yes
when: mongodb_install_conf
when: mongodb_install_server or mongodb_install_conf or mongodb_update_conf
notify: Restart mongodb
tags: [ 'mongodb', 'mongodb_update_conf' ]
- block:
# - name: Install the mongodb configuration
# template: src=mongod-{{ mongodb_version }}.conf.j2 dest=/etc/mongod.conf owner=root group=root mode=0444 backup=yes
# when: mongodb_install_conf
# notify: Restart mongodb
- 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 }}'