From aab63130832dd9bda6d4dfa99e52ffd8ccdae820 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 23 Dec 2016 15:33:06 +0100 Subject: [PATCH] library/roles/mongodb-org-3.2: mongo now binds to localhost by default. Fix the template and the default variables. --- mongodb-org-3.2/defaults/main.yml | 4 ++-- mongodb-org-3.2/templates/mongod-3.2.conf.j2 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mongodb-org-3.2/defaults/main.yml b/mongodb-org-3.2/defaults/main.yml index cc82a35..4a27e50 100644 --- a/mongodb-org-3.2/defaults/main.yml +++ b/mongodb-org-3.2/defaults/main.yml @@ -5,8 +5,9 @@ mongodb_install_conf: True mongodb_upgrade_from_older_version: False # Set to 'latest' if you want to get the latest available package mongodb_pkg_state: present -mongodb_start_server: 'no' +mongodb_start_server: 'yes' mongodb_tcp_port: 27017 +mongo_bind_ip: 0.0.0.0 mongodb_http_interface: 'false' mongodb_http_port: 28017 mongodb_user: mongodb @@ -31,7 +32,6 @@ mongodb_systemlog_logappend: 'true' mongodb_systemlog_logrotate: reopen - mongodb_cluster_enabled: False mongodb_replicaset: storagedev mongodb_replica_keyfile: '{{ mongodb_dbpath }}/replica_keyfile' diff --git a/mongodb-org-3.2/templates/mongod-3.2.conf.j2 b/mongodb-org-3.2/templates/mongod-3.2.conf.j2 index 871adc9..030dd98 100644 --- a/mongodb-org-3.2/templates/mongod-3.2.conf.j2 +++ b/mongodb-org-3.2/templates/mongod-3.2.conf.j2 @@ -23,7 +23,7 @@ systemLog: # network interfaces net: port: {{ mongodb_tcp_port }} - # bindIp: 127.0.0.1 + bindIp: {{ mongo_bind_ip }} http: enabled: {{ mongodb_http_interface }} JSONPEnabled: {{ mongodb_http_interface }}