You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
313 B
14 lines
313 B
import os
|
|
|
|
import testinfra.utils.ansible_runner
|
|
|
|
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'
|
|
|