Feat: formating and remove useless var

This commit is contained in:
Bertrand Benjamin 2022-04-02 08:14:15 +02:00
parent f53c002bff
commit 2cc400da7a
2 changed files with 4 additions and 2 deletions

View File

@ -3,10 +3,9 @@
become: yes
hosts: all
vars:
- collectd_network_server: testvagrant
- collectd_network_server: 192.168.2.240
- collectd_network_port: 25826
pre_tasks:
- name: Update apt cache
apt:

View File

@ -1,10 +1,12 @@
"""Role testing files using testinfra."""
import pytest
def test_installed_packages(host):
collectd = host.package("collectd-core")
assert collectd.is_installed
def test_config(host):
collectd_config = host.file("/etc/collectd/collectd.conf")
assert collectd_config.exists
@ -12,6 +14,7 @@ def test_config(host):
dtypes = host.file("/usr/share/collectd/types.db")
assert dtypes.exists
def test_service(host):
collectd = host.service("collectd")
assert collectd.is_enabled