|
new file 100644
|
|
|
import os
|
|
|
|
|
|
import testinfra.utils.ansible_runner
|
|
|
|
|
|
|
|
|
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
|
|
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('parameters-*-bookworm')
|
|
|
|
|
|
|
|
|
def test_log_rotation_configuration(host):
|
|
|
"""
|
|
|
Tests if log rotation configuration file is absent.
|
|
|
"""
|
|
|
|
|
|
config = host.file('/etc/logrotate.d/slapd')
|
|
|
assert not config.exists
|
|
|
|
|
|
|
|
|
def test_syslog_configuration(host):
|
|
|
"""
|
|
|
Tests if syslog configuration file is absent.
|
|
|
"""
|
|
|
|
|
|
config = host.file('/etc/rsyslog.d/slapd.conf')
|
|
|
assert not config.exists
|