diff --git a/mongodb-org-3.2/tasks/mongodb.yml b/mongodb-org-3.2/tasks/mongodb.yml index 1fa9985..d8bfb35 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