From 090875447030800dcf19cf61852f8301c406eb5d Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 7 Jul 2018 19:30:59 +0200 Subject: [PATCH] small refactoring --- tasks/config.yml | 10 ---------- tasks/install.yml | 9 ++++++++- tasks/main.yml | 1 - 3 files changed, 8 insertions(+), 12 deletions(-) delete mode 100644 tasks/config.yml 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