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
Fix bug with search dir conditional introduced by
Iba17bed79e26e6e7eb2300d413058145ec680d87.
Change-Id: I291e3582e5cb01f4a9c394bc8e7d8289ca577f90
Closes-Bug: #1648490
Fix the regression introduced in
I371d0bbbd1f9dfa893df054471f17f5cc4b640df which causes
the role to fail if a log directory is not provided.
Change-Id: Iba17bed79e26e6e7eb2300d413058145ec680d87
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
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
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
This is an implementation of a pattern for multi-distro support
This allows for support of distros other than Ubuntu
Change-Id: Ide94831464a74827d5c46b38557e483aaf4180d0
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
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>