Role - tripleo_logrotate_crond¶
Role Documentation¶
Welcome to the “tripleo_logrotate_crond” role documentation.
Role Defaults¶
This section highlights all of the defaults and variables set within the “tripleo_logrotate_crond” role.
# All variables intended for modification should be placed in this file.
# All variables within this role should have a prefix of "tripleo_logrotate_crond"
tripleo_logrotate_crond_debug: '{{ (ansible_verbosity | int) >= 2 | bool }}'
tripleo_logrotate_crond_hide_sensitive_logs: true
tripleo_logrotate_crond_cronie_package: cronie
# Pid namespace for podman container. Only change for testing.
tripleo_logrotate_crond_podman_pid: host
tripleo_logrotate_crond_image: quay.io/tripleomastercentos9/openstack-cron:current-tripleo
tripleo_logrotate_crond_config_use_ansible: true
tripleo_logrotate_crond_config_dir: /var/lib/config-data/ansible-generated/crond
tripleo_logrotate_crond_volumes:
- /var/lib/kolla/config_files/logrotate_crond.json:/var/lib/kolla/config_files/config.json:ro
- "{{ tripleo_logrotate_crond_config_dir ~ ':/var/lib/kolla/config_files/src:ro' }}"
- /var/log/containers:/var/log/containers:z
# Enforces life time (days) of rotated and compressed files.
# Overrides the rotation and rotate settings.
tripleo_logrotate_crond_purge_after_days: 14
# Configures the logrotate rotation interval.
tripleo_logrotate_crond_rotation: daily
# Configures the logrotate rotate parameter.
tripleo_logrotate_crond_rotate: 14
# Configures the logrotate minsize parameter.
tripleo_logrotate_crond_minsize: 1
# Configures the logrotate maxsize parameter.
tripleo_logrotate_crond_maxsize: 10M
# Configures the logrotate notifempty parameter.
tripleo_logrotate_crond_notifempty: true
# Configures the logrotate copytruncate parameter.
tripleo_logrotate_crond_copytruncate: true
# Configures the logrotate delaycompress parameter.
tripleo_logrotate_crond_delaycompress: true
# Configures the logrotate compress parameter.
tripleo_logrotate_crond_compress: true
# Configures the dateext parameter.
tripleo_logrotate_crond_dateext:
# Configures the dateformat parameter used with dateext parameter.
tripleo_logrotate_crond_dateformat:
# Configures the dateyesterday parameter used with dateext parameter.
tripleo_logrotate_crond_dateyesterday:
Molecule Scenarios¶
Molecule is being used to test the “tripleo_logrotate_crond” role. The following section highlights the drivers in service and provides an example playbook showing how the role is leveraged.
- Driver: podman
Scenario: default¶
Molecule Inventory¶
hosts:
all:
hosts:
centos:
ansible_python_interpreter: /usr/bin/python3
Example default playbook¶
- name: Converge
hosts: all
vars:
tripleo_container_manage_debug: true
tasks:
- name: install tripleo_logrotate_crond
include_role:
name: tripleo_logrotate_crond
tasks_from: install.yml
- name: configure tripleo_logrotate_crond
include_role:
name: tripleo_logrotate_crond
tasks_from: configure.yml