Skip to content

Releases: linux-system-roles/logging

Version 1.9.4

19 Jul 21:46
Compare
Choose a tag to compare

[1.9.4] - 2022-07-19

New Features

  • none

Bug Fixes

  • support ansible-core-2.13

Looks like ansible-core-2.13 (or latest jinja3) does not support
constructs like this:

var: "{{ [some list] }} + {{ [other list] }}"

instead, the entire thing has to be evaluated in the same jinja
evaluation context:

var: "{{ [some list] + [other list] }}"

Other Changes

  • use gather_facts: true in tests_include_vars_from_parent

This test does not work with ANSIBLE_GATHERING=explicit - add
explicit gather_facts: true

  • make min_ansible_version a string in meta/main.yml

The Ansible developers say that min_ansible_version in meta/main.yml
must be a string value like "2.9", not a float value like 2.9.

  • Add CHANGELOG.md

  • Modify CHANGELOG.md

  • Replace the ATX style with the setext style for the header H1 and H2.

  • Each changelog has 3 sections, "### New Features", "### Bug Fixes",
    and "Other Changes".

  • If there is no items in a section, let it have "- none".

  • Add changelog_to_tag.yml to .github/workflows

Version 1.9.3

13 Jun 15:27
Compare
Choose a tag to compare

Fix including a var file in set_vars.yml.

['{{ role_path }}/vars/main.yml'] in the original code fails with
"Could not find or access '{{ role_path }}/vars/main.yml'". The
path in the name string was fixed, as well.

bump tox-lsr version to 2.11.0; remove py37; add py310

16 May 18:40
Compare
Choose a tag to compare

[citest skip] bump tox-lsr version to 2.11.0; remove py37; add py310

tox-lsr version 2.11.0 has support for collection-requirements.yml,
runqemu improvements, and support for python 3.10

python 3.7 is not used on any supported platform, so remove it

Signed-off-by: Rich Megginson [email protected]

support gather_facts: false; support setup-snapshot.yml

27 Apr 21:06
Compare
Choose a tag to compare

support gather_facts: false; support setup-snapshot.yml

Some users use gather_facts: false in their playbooks. This changes
the role to work in that case, by gathering only the facts it requires
to run.
CI testing can be sped up by creating a snapshot image pre-installed
with packages. tests/setup-snapshot.yml can be used by a CI system
to do this.

Logging role tests used to check installed packages are necessary and
sufficient. Also, they uninstalled the installed packages at the end
of each test. They are eliminated since it'd get broken when the pre-
installed snapshot image is used.

  • Remove the unnecessary setup task from tests_include_vars_from_parent.yml.

  • Run set_vars.yml in the roles/rsyslog/tasks level via the logging role.

  • To gather the all package names to be installed in tests/setup-
    snapshot.yml, set __snapshot_gather_vars to true.

  • Improved the way how to get the packages to be installed then install
    them using the info. (using varnames lookup)

  • tests/setup-snapshot.yml needs to gather the necessary ansible facts
    and the packages to be used in the series of tests. The task is done
    using the logging role where only gathering but no other tasks is
    executed.

  • In ovirt/set_vars.yml, replacing default_ipv4 with network since gather_
    subset only takes allowed keywords.

support template, severity and facility options

06 Apr 21:14
Compare
Choose a tag to compare

RFE - support template, severity and facility options

  • template options to the files & formats output
  • severity and facility options to the files input

(issue #271)

Initialize tests_enabled.yml by setting "logging_purge_confs: true"

This is part of the effort to allow CI tests run in the serialized
manner on one VM for shortening the duration of the CI tests. The
test case tests_enabled.yml expects the rsyslog configuration file
in the original state from the rsyslog rpm package.

Fix failures reported by "tox -e qemu_option -- --remove-cloud-init ..."

If no additional config files such as 21-cloudinit.conf exist in
/etc/rsyslog.d; in the cleaning up phase in the test playbooks,
by removing all the generated files by the logging role, it ends
up /etc/rsyslog.d is empty with "$IncludeConfig /etc/rsyslog.d/*.conf"
in /etc/rsyslog.conf. It makes the following rsyslog service restart
fail.

This patch replaces the old cleaning up method - removing the
files in /etc/rsyslog.d with the better one - resetting the
rsyslog config files to the ones from rpm.

make logging_purge_confs idempotent; get rid of logging_reset_confs

27 Jan 23:27
Compare
Choose a tag to compare

make purge idempotent; get rid of reset

The use of logging_purge_confs should be be idempotent. This is done
by first getting a list of all unowned config files to see if there are
any. If there are, then the role will remove all unowned config files
not being currently written by the role invocation. That way, if you
run the role again with logging_purge_confs: true and the same
parameters, the role will detect that there should be no changes to the
existing files, and return changed: false.

Get rid of logging_reset_confs - use only purge. The way purge
works now is that it will look if the rsyslog package needs to be
reinstalled, by checking if /etc/rsyslog.conf is modified, and the
user has not provided any rsyslog_inputs (because rsyslog_inputs
will trigger /etc/rsyslog.conf to be overwritten if __rsyslog_enabled).

Fix and refactor logging_purge_confs and logging_restore_confs

19 Jan 02:32
Compare
Choose a tag to compare

[FIX] "Purge original conf" task

file module state=absent does not work with path=/some/dir/* (wildcard)
file module should support state=empty see: ansible/ansible#18910
state=empty is needed here - and should be used later
Use rm -rfv so that the files being removed will be shown

Refactor logging_purge_confs and logging_restore_confs.

  • logging_purge_confs: true or false.
    If logging_purge_confs is set to true, remove files in rsyslog.d
    which do not belong to any rpm packages. That includes config files
    generated by the previous logging role run.
    Default to false.
  • logging_reset_confs: true or false.
    If logging_reset_confs is set to true, reinstall rsyslog package,
    and restore the pre-existing config files, which restores the
    default /etc/rsyslog.conf.
    Default to false.

Note: Variable logging_restore_confs is replaced with logging_reset_confs.

Other changes in the refactor:

  • A test case is added to tests_basics_forwards TEST CASE 2, where
    the even if the config files installed by other packages are
    accidentally removed, it's verified that the logging system
    (rsyslog) can be reset and restarted with "logging_reset_confs:
    true" in the cleanup playbook.
  • A test case only sets purge and reset is added.

Add logging_restore_confs variable - remove recursive symlink in tests/roles

11 Jan 13:39
Compare
Choose a tag to compare

change recursive role symlink to individual role dir symlinks

Signed-off-by: Rich Megginson [email protected]

bump tox-lsr version to 2.8.3

Signed-off-by: Rich Megginson [email protected]

Add logging_restore_confs variable to restore backup.

Following the suggestion from @richm (Thank you!),
generates a back up only once in /var/tmp/rsyslog,
which stores the rsyslog logging files prior to
running logging role.

Remove "changed_when: false" from the backup dir and
file creation tasks.

add test case for missing quotes for immark configuration

03 Dec 01:02
Compare
Choose a tag to compare

update tox-lsr version to 2.8.0

New version adds check for proper commenting of the ansible_managed var

Signed-off-by: Sergei Petrosian [email protected]

Run the new tox test

Signed-off-by: Sergei Petrosian [email protected]

Add a test case for "add missing quotes" to TEST CASE 0 in tests_basics_files.yml

fix quoting of immark interval; test with ansible 2.12

08 Nov 20:50
Compare
Choose a tag to compare

Support ansible-core 2.11

Updated .ansible-lint to skip a role name warning in the meta file.

Added "name" to debug tasks to satisfy ansible-lint.

support python 39, ansible-core 2.12, ansible-plugin-scan

update tox-lsr version to 2.7.1

update the tox-lsr version used in github actions tox CI
to 2.7.1

The only difference between this an 2.7.0 is that Ansible 2.12
is now GA.

Signed-off-by: Rich Megginson [email protected]

add missing quotes