From f82932440004bb7066dee661dcdf93e93b1f49bf Mon Sep 17 00:00:00 2001 From: Kirill Klenov Date: Fri, 26 Dec 2014 18:32:50 +0300 Subject: [PATCH 1/2] Support mongoshell --- README.md | 6 ++++++ defaults/main.yml | 6 ++++++ tasks/configure.yml | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/README.md b/README.md index 73ef147..debe154 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,12 @@ mongodb_conf_syslog: no # Log to system's syslog facil mongodb_conf_replSet: # Enable replication [/] mongodb_conf_replIndexPrefetch: all # specify index prefetching behavior (if secondary) [none|_id_only|all] +mongodb_shell: [] # Define mongo shell commands to run + # Syntax: mongodb_shell: + # dbname: + # - db.setProfilingLevel(1, 50) + + # MMS Agent mongodb_mms_agent_pkg: https://mms.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_1.4.2.783-1_amd64.deb mongodb_mms_group_id: "" diff --git a/defaults/main.yml b/defaults/main.yml index 8f61930..ac5ce9e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -31,6 +31,12 @@ mongodb_conf_syslog: no # Log to system's syslog facil mongodb_conf_replSet: # Enable replication [/] mongodb_conf_replIndexPrefetch: all # specify index prefetching behavior (if secondary) [none|_id_only|all] +mongodb_shell: [] # Define mongo shell commands to run + # Syntax: mongodb_shell: + # dbname: + # - db.setProfilingLevel(1, 50) + + # MMS Agent mongodb_mms_agent_pkg: https://mms.mongodb.com/download/agent/automation/mongodb-mms-automation-agent-manager_1.4.2.783-1_amd64.deb mongodb_mms_group_id: "" diff --git a/tasks/configure.yml b/tasks/configure.yml index 72dbb6c..a7d8e61 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -16,3 +16,7 @@ - name: Configure logs file: state=file path={{ mongodb_conf_logpath }} owner={{mongodb_user}} group={{mongodb_user}} mode=0644 + +- name: Run mongoshell commands + command: mongo {{ item.key }} --eval "{{ item.value|join('\n') }}" + with_dict: mongodb_shell From 0b9f08e2914b2216d3f3f72b81fe4669d1ebecc8 Mon Sep 17 00:00:00 2001 From: Kirill Klenov Date: Fri, 26 Dec 2014 18:33:02 +0300 Subject: [PATCH 2/2] =?UTF-8?q?Bump=20version:=202.0.0=20=E2=86=92=202.1.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 5824209..3e53887 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,6 +1,6 @@ [bumpversion] commit = True -current_version = 2.0.0 +current_version = 2.1.0 tag = True tag_name = {new_version}