Hide Forgot
Description of problem: playbook should configure logrotate on containerized env Version-Release number of selected component (if applicable): openshift-ansible-3.0.33-1.git.0.bb1f8aa.el7aos.noarch How reproducible: always Steps to Reproduce: 1. Install containerized environment on rhel7 or atomic with logrotate this plugin is enable by default. 2.check the logrotate package rpm -q logrotate Actual results: The package is not installed on rhel Expected results: The package is installed on rhel. Additional info: The package is installed on Atomic, so playbook should not skip configuring logrotate on containerized env
Proposed fix: https://github.com/openshift/openshift-ansible/pull/1288 The "logrotate_scripts" inventory variable is not set by default so no logrotate scripts will be configured by default. An example "logrotate_scripts" has been added to the byo example inventories. The logrotate role will be applied to RHEL and Atomic containerized environments.
Check on openshift-ansible -b master 1. install environment on rhel7 and atomic #vim hosts <--snip--> logrotate_scripts=[{"name": "syslog", "path": "/var/log/cron\n/var/log/maillog\n/var/log/messages\n/var/log/secure\n/var/log/spooler\n", "options": ["daily", "rotate 7", "compress", "sharedscripts", "missingok"], "scripts": {"postrotate": "/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true"}}] <--[snip--> ansible will configure logrotate by default. # cat /etc/logrotate.d/syslog # Ansible managed: /home/slave10/workspace/Launch_Environment/workdir/BJ-113-f22-10-0/openshift-ansible/playbooks/common/openshift-node/roles/nickhammond.logrotate/templates/logrotate.d.j2 modified on 2016-01-29 03:08:24 by slave10 on host-192-168-0-188 /var/log/cron /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler { daily rotate 7 compress sharedscripts missingok postrotate /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true endscript } Move this issue to VERIFIED
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1065