Merge "Add parameters for dateext in logrotate" into stable/stein
This commit is contained in:
commit
c778abdb78
|
@ -54,6 +54,28 @@ parameters:
|
||||||
description: Enforces life time (days) of rotated and compressed files.
|
description: Enforces life time (days) of rotated and compressed files.
|
||||||
type: string
|
type: string
|
||||||
default: '14'
|
default: '14'
|
||||||
|
LogrotateDateExt:
|
||||||
|
description: Enable/disable dateext parameter.
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
LogrotateDateFormat:
|
||||||
|
description: Configures dateformat strings for containerized logrotate.
|
||||||
|
This is valid when LogrotateDateExt is true.
|
||||||
|
The allowed specifiers are only %Y %m %d %H %M %S %V and %s.
|
||||||
|
type: string
|
||||||
|
default: '-%Y%m%d'
|
||||||
|
constraints:
|
||||||
|
- allowed_pattern: '-(%[YmdHMSVs])+$'
|
||||||
|
LogrotateDateYesterday:
|
||||||
|
description: Configures dateyesterday paramter for containerized logrotate.
|
||||||
|
This is valid when LogrotateDateExt is true.
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
|
conditions:
|
||||||
|
|
||||||
|
logrotatedateext_is_enabled: {equals: [{get_param: LogrotateDateExt}, true]}
|
||||||
|
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
|
|
||||||
|
@ -65,18 +87,23 @@ outputs:
|
||||||
value:
|
value:
|
||||||
service_name: logrotate_crond
|
service_name: logrotate_crond
|
||||||
config_settings:
|
config_settings:
|
||||||
tripleo::profile::base::logging::logrotate::maxsize: {get_param: LogrotateMaxsize}
|
map_merge:
|
||||||
tripleo::profile::base::logging::logrotate::rotation: {get_param: LogrotateRotationInterval}
|
- tripleo::profile::base::logging::logrotate::maxsize: {get_param: LogrotateMaxsize}
|
||||||
tripleo::profile::base::logging::logrotate::rotate: {get_param: LogrotateRotate}
|
tripleo::profile::base::logging::logrotate::rotation: {get_param: LogrotateRotationInterval}
|
||||||
tripleo::profile::base::logging::logrotate::purge_after_days: {get_param: LogrotatePurgeAfterDays}
|
tripleo::profile::base::logging::logrotate::rotate: {get_param: LogrotateRotate}
|
||||||
|
tripleo::profile::base::logging::logrotate::purge_after_days: {get_param: LogrotatePurgeAfterDays}
|
||||||
|
tripleo::profile::base::logging::logrotate::dateext: {get_param: LogrotateDateExt}
|
||||||
|
- if:
|
||||||
|
- logrotatedateext_is_enabled
|
||||||
|
- tripleo::profile::base::logging::logrotate::dateformat: {get_param: LogrotateDateFormat}
|
||||||
|
tripleo::profile::base::logging::logrotate::dateyesterday: {get_param: LogrotateDateYesterday}
|
||||||
|
- {}
|
||||||
host_prep_tasks:
|
host_prep_tasks:
|
||||||
- name: allow logrotate to read inside containers
|
- name: allow logrotate to read inside containers
|
||||||
seboolean:
|
seboolean:
|
||||||
name: logrotate_read_inside_containers
|
name: logrotate_read_inside_containers
|
||||||
persistent: yes
|
persistent: yes
|
||||||
state: yes
|
state: yes
|
||||||
|
|
||||||
deploy_steps_tasks:
|
deploy_steps_tasks:
|
||||||
- name: configure tmpwatch on the host
|
- name: configure tmpwatch on the host
|
||||||
when: step|int == 2
|
when: step|int == 2
|
||||||
|
|
Loading…
Reference in New Issue