From e292e44978345f99a3cfc701c422340d5c7421b9 Mon Sep 17 00:00:00 2001 From: vagrant Date: Tue, 9 Apr 2019 10:00:17 +0200 Subject: [PATCH 1/4] Deprecation for apt resolved --- tasks/install.debian.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tasks/install.debian.yml b/tasks/install.debian.yml index a508d20..f02c945 100644 --- a/tasks/install.debian.yml +++ b/tasks/install.debian.yml @@ -50,10 +50,11 @@ when: mongodb_package == 'mongodb-org' - name: Install MongoDB package - apt: name={{item}} state=present - with_items: - - "{{mongodb_package}}" - - numactl + apt: + name: + - "{{mongodb_package}}" + - numactl + state: present - name: Add systemd configuration if present copy: src=mongodb.service dest=/lib/systemd/system/mongodb.service owner=root group=root mode=0640 @@ -76,10 +77,10 @@ when: not mongodb_pymongo_from_pip - name: Install PIP - apt: pkg={{ item }} - with_items: - - python-dev - - python-pip + apt: + pkg: + - python-dev + - python-pip when: mongodb_pymongo_from_pip - name: Install PyMongo from PIP From 70ae07a6e70f74800bc7e3d8b519de2b394dd496 Mon Sep 17 00:00:00 2001 From: vagrant Date: Tue, 9 Apr 2019 10:35:12 +0200 Subject: [PATCH 2/4] Deprecation test as filters resolved --- tasks/configure.yml | 2 +- templates/mongod.conf.j2 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index 59d4d16..ee335b3 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -50,7 +50,7 @@ - name: mongodb restart service: name={{ mongodb_daemon_name }} state=restarted - when: config_result|changed and mongodb_manage_service + when: config_result is is changed and mongodb_manage_service - name: Ensure service is started service: name={{ mongodb_daemon_name }} state=started diff --git a/templates/mongod.conf.j2 b/templates/mongod.conf.j2 index 9b8b3e8..a3048a6 100644 --- a/templates/mongod.conf.j2 +++ b/templates/mongod.conf.j2 @@ -2,7 +2,7 @@ net: bindIp: {{ mongodb_net_bindip }} - {% if mongodb_major_version | version_compare("3.6", "<") -%} + {% if mongodb_major_version is version_compare("3.6", "<") -%} http: enabled: {{ mongodb_net_http_enabled | to_nice_json }} {% endif -%} @@ -39,7 +39,7 @@ security: storage: dbPath: {{ mongodb_storage_dbpath }} directoryPerDB: {{ mongodb_storage_dirperdb | to_nice_json }} - {% if mongodb_major_version | version_compare("3.0", ">=") -%} + {% if mongodb_major_version is version_compare("3.0", ">=") -%} engine: {{ mongodb_storage_engine }} {% endif -%} journal: From e4e550416810b1c307d7fe1f9ba9160bdacc5526 Mon Sep 17 00:00:00 2001 From: vagrant Date: Tue, 9 Apr 2019 10:37:54 +0200 Subject: [PATCH 3/4] Typo resolved --- tasks/configure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index ee335b3..2a73cfd 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -50,7 +50,7 @@ - name: mongodb restart service: name={{ mongodb_daemon_name }} state=restarted - when: config_result is is changed and mongodb_manage_service + when: config_result is changed and mongodb_manage_service - name: Ensure service is started service: name={{ mongodb_daemon_name }} state=started From becfbc467201b14faff4f25bb05e830ac6771d94 Mon Sep 17 00:00:00 2001 From: vagrant Date: Tue, 9 Apr 2019 10:40:48 +0200 Subject: [PATCH 4/4] Flush handlers warning in block --- tasks/install.debian.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks/install.debian.yml b/tasks/install.debian.yml index f02c945..be5a47b 100644 --- a/tasks/install.debian.yml +++ b/tasks/install.debian.yml @@ -69,7 +69,8 @@ shell: systemctl daemon-reload when: mongodb_is_systemd and mongodb_manage_service -- meta: flush_handlers +- block: + - meta: flush_handlers when: mongodb_is_systemd - name: Install PyMongo package