Commit Graph

11 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov dcf6aed584 Deprecate rsyslog_client role
Depends-On: https://review.opendev.org/c/openstack/project-config/+/863079
Change-Id: I47bcd43247e0d589932b63cec782567d33d35f28
2022-10-31 16:56:19 +01:00
Jean-Philippe Evrard 7b2cd66e97 Test postrotate works
We should:
- Not check what we do not set (kern.log and auth.log are already
defined in rsyslog file, which we do not template). These two
files would trigger an issue if both are in the same logrotate
configuration.
- Check that the rotation works, by forcing a rotation, and seeing
that the new files are empty.

Change-Id: I08357260e45919d9e71586cac6b9ce413adffc22
Closes-Bug: 1699875
Closes-Bug: 1709291
2017-08-23 20:19:45 +00:00
Logan V f57486e1a9 Fix log search dir conditional
Fix bug with search dir conditional introduced by
Iba17bed79e26e6e7eb2300d413058145ec680d87.

Change-Id: I291e3582e5cb01f4a9c394bc8e7d8289ca577f90
Closes-Bug: #1648490
2016-12-08 09:48:43 -06:00
Logan V 16f933ab12 Fix rsyslog_client_log_dir to be optional
Fix the regression introduced in
I371d0bbbd1f9dfa893df054471f17f5cc4b640df which causes
the role to fail if a log directory is not provided.

Change-Id: Iba17bed79e26e6e7eb2300d413058145ec680d87
2016-11-14 06:51:33 -06:00
Jesse Pretorius c0cff7b366 Remove rsyslog_client_repos var and fix apt cache updating
The ability to implement a custom apt/yum repository for rsyslog_client
has been removed as it is unused. Deployers may opt to do this in
a number of other methods (including customising the base container
cache) which do not require us to maintain this code.

Having this ability there resulted in the apt cache updating every time
the role executed even though there was no repo being added.

The cache_timeout variable is moved to the role defaults to allow it
to be overridden more easily and to be exposed in the role docs.

Change-Id: I113c9803495f2a935b99f272c387a4304a149cbf
2016-08-22 15:15:20 +00:00
Jesse Pretorius ef0664ffe2 Add ability to change apt/yum package state
The current method of installing the distribution packages required is
set in the tasks and cannot be changed by a deployer.

Currently the apt task always installs the latest package. This results
in unexpected binary changes when a deployer may simply be trying to
execute a configuration change.

This patch adds the ability for a deployer to change the desired state
so that the results are predictable.

Change-Id: Ie75b2eb144a622373ff204b4a9d79a8791ea4790
2016-08-02 15:46:54 +01:00
Jimmy McCrory 6c1f43a4cc Allow overriding of default logrotate options
Two variables have been added, rsyslog_client_log_rotate_options
and rsyslog_client_log_rotate_scripts, to allow deployers to override
and set logrotate config options as they wish.

The os_aggregate_storage.j2 template has also been renamed to
logrotate.j2 to better fit its purpose.

Change-Id: If7538fd2409f3583f22209868f538e01796813c2
2016-07-05 20:38:39 -07:00
Travis Truman 51d8a9e2df Multi-distro pattern for rsyslog-client role
This is an implementation of a pattern for multi-distro support

This allows for support of distros other than Ubuntu

Change-Id: Ide94831464a74827d5c46b38557e483aaf4180d0
2016-04-27 11:22:12 -04:00
Travis Truman f7492556f9 Ansible 2.x - Address deprecation warning of bare variables
Ansible 2.2 will not allow "bare" variable references
in with_* loops. See https://docs.ansible.com/ansible/porting_guide_2.0.html#deprecated
for details.

Change-Id: Ib71579d1e0f88d1acc0889cdd29a3fa89157b30e
2016-04-20 09:33:59 -04:00
Jean-Philippe Evrard ff71d49ce9 Only update apt cache if necessary
Workarounding the upstream ansible apt module bug

documented here:

https://github.com/ansible/ansible-modules-core/pull/1517

For the next versions of ansible we'll be using, we should

check if the apt bug is fixed. When it's fixed, we could

abandon this change and use the standard apt module

with correct cache handling.

Change-Id: I72cdba6820f1ec0066567b5cde539f018b5779b9
2016-02-15 14:49:43 +01:00
Kevin Carter ed60bae35a
IRR for rsyslog_client
The change moves the role out from the main repo rsyslog_client
repository and into its own standalone repository.

Items within this change:
  * The role has been updated to ensure it runs standalone.
  * Tests added to the role within tox.
  * Functional tests added to the role that can either be run
    via the run_tests.sh script or using tox.
  * dev requirements have been updated for testing usecases.
  * Docs added to both the README.rst file as well as the docs
    folder.

Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-11-03 02:27:54 -06:00