Skip to content

Commit 387e7f7

Browse files
authored
Merge pull request #144 from kraeml/feature/deprecation
Deprecation for apt resolved for debian
2 parents 1aa3352 + becfbc4 commit 387e7f7

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

tasks/configure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
- name: mongodb restart
5252
service: name={{ mongodb_daemon_name }} state=restarted
53-
when: config_result|changed and mongodb_manage_service
53+
when: config_result is changed and mongodb_manage_service
5454

5555
- name: Ensure service is started
5656
service: name={{ mongodb_daemon_name }} state=started

tasks/install.debian.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,11 @@
5050
when: mongodb_package == 'mongodb-org'
5151

5252
- name: Install MongoDB package
53-
apt: name={{item}} state=present
54-
with_items:
55-
- "{{mongodb_package}}"
56-
- numactl
53+
apt:
54+
name:
55+
- "{{mongodb_package}}"
56+
- numactl
57+
state: present
5758

5859
- name: Add systemd configuration if present
5960
copy: src=mongodb.service dest=/lib/systemd/system/mongodb.service owner=root group=root mode=0640
@@ -68,18 +69,19 @@
6869
shell: systemctl daemon-reload
6970
when: mongodb_is_systemd and mongodb_manage_service
7071

71-
- meta: flush_handlers
72+
- block:
73+
- meta: flush_handlers
7274
when: mongodb_is_systemd
7375

7476
- name: Install PyMongo package
7577
apt: pkg=python-pymongo state=latest
7678
when: not mongodb_pymongo_from_pip
7779

7880
- name: Install PIP
79-
apt: pkg={{ item }}
80-
with_items:
81-
- python-dev
82-
- python-pip
81+
apt:
82+
pkg:
83+
- python-dev
84+
- python-pip
8385
when: mongodb_pymongo_from_pip
8486

8587
- name: Install PyMongo from PIP

templates/mongod.conf.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
net:
44
bindIp: {{ mongodb_net_bindip }}
5-
{% if mongodb_major_version | version_compare("3.6", "<") -%}
5+
{% if mongodb_major_version is version_compare("3.6", "<") -%}
66
http:
77
enabled: {{ mongodb_net_http_enabled | to_nice_json }}
88
{% endif -%}
@@ -39,7 +39,7 @@ security:
3939
storage:
4040
dbPath: {{ mongodb_storage_dbpath }}
4141
directoryPerDB: {{ mongodb_storage_dirperdb | to_nice_json }}
42-
{% if mongodb_major_version | version_compare("3.0", ">=") -%}
42+
{% if mongodb_major_version is version_compare("3.0", ">=") -%}
4343
engine: {{ mongodb_storage_engine }}
4444
{% endif -%}
4545
journal:

0 commit comments

Comments
 (0)