Install useful packages

This commit is contained in:
Alex Kotov 2020-01-14 12:52:08 +05:00
parent c9a3cc13ed
commit 6145fc6e09
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
2 changed files with 11 additions and 6 deletions

View File

@ -1,4 +1,5 @@
import os
import pytest
import testinfra.utils.ansible_runner
@ -6,9 +7,9 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
def test_hosts_file(host):
f = host.file('/etc/hosts')
assert f.exists
assert f.user == 'root'
assert f.group == 'root'
@pytest.mark.parametrize(
'package_name',
['bash-completion', 'colordiff', 'curl', 'less', 'vim'],
)
def test_packages(host, package_name):
assert host.package(package_name).is_installed

View File

@ -1 +1,5 @@
---
- name: Install useful packages
apt:
update_cache: true
name: ['bash-completion', 'colordiff', 'curl', 'less', 'vim']