diff --git a/tests/playbook.yml b/tests/playbook.yml index e739a2b8827a164702a059f09277dd60fa516e36..29a1fe9f2c36834f0bd9bfeffe48e05ece654455 100644 --- a/tests/playbook.yml +++ b/tests/playbook.yml @@ -1,5 +1,9 @@ --- -- hosts: all +- hosts: ansible-role-syslog-forward-openbsd gather_facts: false - roles: - - role: ansible-role-example + roles: [ role: ansible-role-openbsd-bootstrap ] + +- hosts: all + vars: + syslog_server: 169.254.254.254 + roles: [ role: ansible-role-syslog-forward ] diff --git a/tests/test_example.py b/tests/test_example.py deleted file mode 100644 index 0596b7d508b25f8a2bbfc57371089942f13ddeb1..0000000000000000000000000000000000000000 --- a/tests/test_example.py +++ /dev/null @@ -1,6 +0,0 @@ -def test_example(Command): - assert Command('uname').rc == 0 - - -def test_ansible(Ansible): - assert Ansible('debug', 'msg={{ eleven }}')['msg'] == '11' diff --git a/tests/test_syslog_forward.py b/tests/test_syslog_forward.py new file mode 100644 index 0000000000000000000000000000000000000000..1e0f862fe28bac72ab9779edac34ae1a995444a8 --- /dev/null +++ b/tests/test_syslog_forward.py @@ -0,0 +1,5 @@ +def test_syslog_forward(Service, SystemInfo): + if SystemInfo.type == 'openbsd': + assert Service('syslogd').is_running + if SystemInfo.type == 'linux' and SystemInfo.distribution == 'debian' + assert Service('rsyslog').is_running