From 2b7ad8b1329a6078e14aacf569e9d84095fd4b0d Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 13 Jan 2017 19:55:33 +0100 Subject: [PATCH] library/roles/mongodb-org-3.2/tasks/mongodb.yml: Install the configuration file before installing the package. --- mongodb-org-3.2/tasks/mongodb.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mongodb-org-3.2/tasks/mongodb.yml b/mongodb-org-3.2/tasks/mongodb.yml index 1fa99855..d8bfb350 100644 --- a/mongodb-org-3.2/tasks/mongodb.yml +++ b/mongodb-org-3.2/tasks/mongodb.yml @@ -32,7 +32,13 @@ apt_repository: repo="deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/3.2 multiverse" update_cache=yes state=present when: mongodb_install_from_external_repo tags: mongodb - + +- name: Install the mongodb 3.2 configuration + template: src=mongod-3.2.conf.j2 dest=/etc/mongod.conf owner=root group=root mode=0444 + when: mongodb_install_conf + notify: Restart mongodb + tags: mongodb + - name: We are upgrading, install the latest version of the mongo packages apt: pkg={{ item }} state=latest with_items: @@ -70,12 +76,6 @@ when: mongodb_install_conf tags: mongodb -- name: Install the mongodb 3.2 configuration - template: src=mongod-3.2.conf.j2 dest=/etc/mongod.conf owner=root group=root mode=0444 - when: mongodb_install_conf - notify: Restart mongodb - tags: mongodb - - name: Install the mongodb defaults file template: src=mongod-default.j2 dest=/etc/default/mongod owner=root group=root mode=0444 when: mongodb_install_conf