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,7 +3,6 @@
become: yes become: yes
hosts: all hosts: all
vars: vars:
- collectd_network_server: testvagrant
- collectd_network_server: 192.168.2.240 - collectd_network_server: 192.168.2.240
- collectd_network_port: 25826 - collectd_network_port: 25826

View File

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