Skip to content

Commit a77efe0

Browse files
committed
add systemLog.logRotate option as configurable
1 parent 5739b0b commit a77efe0

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ mongodb_storage_prealloc: true # Enable data file preallocatio
5353
## If you specify 'file', you must also specify mongodb_systemlog_path.
5454
mongodb_systemlog_destination: "file"
5555
mongodb_systemlog_logappend: true # Append to logpath instead of over-writing
56+
mongodb_systemlog_logrotate: "rename" # Logrotation behavior
5657
mongodb_systemlog_path: /var/log/mongodb/{{ mongodb_daemon_name }}.log # Log file to send write to instead of stdout
5758

5859
## replication Options

templates/mongod.conf.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ systemLog:
5050
destination: {{ mongodb_systemlog_destination }}
5151
{% if mongodb_systemlog_destination == 'file' -%}
5252
logAppend: {{ mongodb_systemlog_logappend | to_nice_json }}
53+
logRotate: {{ mongodb_systemlog_logrotate }}
5354
path: {{ mongodb_systemlog_path }}
5455
{% endif %}
5556

templates/mongod_init.conf.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@ systemLog:
3838
destination: {{ mongodb_systemlog_destination }}
3939
{% if mongodb_systemlog_destination == 'file' -%}
4040
logAppend: {{ mongodb_systemlog_logappend | to_nice_json }}
41+
logRotate: {{ mongodb_systemlog_logrotate }}
4142
path: {{ mongodb_systemlog_path }}
4243
{% endif -%}

0 commit comments

Comments
 (0)