Merge pull request #2 from thiagoalmeidasa/1-improve-systemLog-options
Modifying mongod conf template. closes #1
This commit is contained in:
commit
1731f12a20
|
@ -23,14 +23,17 @@
|
||||||
|
|
||||||
- name: Create log dir if missing
|
- name: Create log dir if missing
|
||||||
file: state=directory recurse=yes dest={{ mongodb_systemlog_path|dirname }} owner={{ mongodb_user }} group={{mongodb_user}} mode=0755
|
file: state=directory recurse=yes dest={{ mongodb_systemlog_path|dirname }} owner={{ mongodb_user }} group={{mongodb_user}} mode=0755
|
||||||
|
when: mongodb_systemlog_destination == "file"
|
||||||
|
|
||||||
- name: Check than logfile exists
|
- name: Check than logfile exists
|
||||||
stat: path={{ mongodb_systemlog_path }}
|
stat: path={{ mongodb_systemlog_path }}
|
||||||
register: logfile_stat
|
register: logfile_stat
|
||||||
|
when: mongodb_systemlog_destination == "file"
|
||||||
|
|
||||||
- name: Create log if missing
|
- name: Create log if missing
|
||||||
file: state=touch dest={{ mongodb_systemlog_path }} owner={{ mongodb_user }} group={{mongodb_user}} mode=0755
|
file: state=touch dest={{ mongodb_systemlog_path }} owner={{ mongodb_user }} group={{mongodb_user}} mode=0755
|
||||||
when: logfile_stat is defined and not logfile_stat.stat.exists
|
when: logfile_stat is defined and not logfile_stat.stat.exists
|
||||||
|
when: mongodb_systemlog_destination == "file"
|
||||||
|
|
||||||
- name: Ensure dbpath directory
|
- name: Ensure dbpath directory
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -53,8 +53,10 @@ storage:
|
||||||
|
|
||||||
systemLog:
|
systemLog:
|
||||||
destination: {{ mongodb_systemlog_destination }}
|
destination: {{ mongodb_systemlog_destination }}
|
||||||
|
{% if mongodb_systemlog_destination == 'file' -%}
|
||||||
logAppend: {{ mongodb_systemlog_logappend | to_nice_json }}
|
logAppend: {{ mongodb_systemlog_logappend | to_nice_json }}
|
||||||
path: {{ mongodb_systemlog_path }}
|
path: {{ mongodb_systemlog_path }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if mongodb_set_parameters -%}
|
{% if mongodb_set_parameters -%}
|
||||||
setParameter:
|
setParameter:
|
||||||
|
|
|
@ -41,5 +41,7 @@ storage:
|
||||||
|
|
||||||
systemLog:
|
systemLog:
|
||||||
destination: {{ mongodb_systemlog_destination }}
|
destination: {{ mongodb_systemlog_destination }}
|
||||||
|
{% if mongodb_systemlog_destination == 'file' -%}
|
||||||
logAppend: {{ mongodb_systemlog_logappend | to_nice_json }}
|
logAppend: {{ mongodb_systemlog_logappend | to_nice_json }}
|
||||||
path: {{ mongodb_systemlog_path }}
|
path: {{ mongodb_systemlog_path }}
|
||||||
|
{% endif -%}
|
||||||
|
|
Loading…
Reference in New Issue