Skip to content
Snippets Groups Projects
Commit ddb6c3eb authored by nimrod's avatar nimrod
Browse files

- Use SystemInfo to determine to OS type (instead of using the facts from the...

- Use SystemInfo to determine to OS type (instead of using the facts from the Ansbile module and the Testinfra backend module, which is just ugly code).
parent 4a2811b7
No related branches found
No related tags found
No related merge requests found
--- ---
- hosts: all - hosts: ansible-role-syslog-forward-openbsd
gather_facts: false gather_facts: false
roles: roles: [ role: ansible-role-openbsd-bootstrap ]
- role: ansible-role-example
- hosts: all
vars:
syslog_server: 169.254.254.254
roles: [ role: ansible-role-syslog-forward ]
def test_example(Command):
assert Command('uname').rc == 0
def test_ansible(Ansible):
assert Ansible('debug', 'msg={{ eleven }}')['msg'] == '11'
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment