diff --git a/tasks/config.yml b/tasks/config.yml deleted file mode 100644 index fcbaa76..0000000 --- a/tasks/config.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- name: Configure database - block: - - name: Deploy configuration file - template: - src: etc/mongod.conf.j2 - dest: /etc/mongod.conf - mode: 0644 - notify: __mongod_restart - become: True diff --git a/tasks/install.yml b/tasks/install.yml index fe46883..e3b4e93 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -53,7 +53,14 @@ group: "{{ mongodb_system_group }}" recurse: yes state: directory - when: mongodb_systemlog_destination == 'logfile' + when: mongodb_systemlog_destination == 'file' + + - name: Deploy configuration file + template: + src: etc/mongod.conf.j2 + dest: /etc/mongod.conf + mode: 0644 + notify: __mongod_restart - name: Make sure mongodb is up and running systemd: diff --git a/tasks/main.yml b/tasks/main.yml index 8924ad7..27e0a37 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,4 +1,3 @@ --- - include_tasks: install.yml - include_tasks: auth.yml -- include_tasks: config.yml