summaryrefslogtreecommitdiffstats
path: root/modules/host_definitions/file.py
blob: 3466db3273fa6e3f0e845834f721c40c3080e352 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env python
import yaml

def get(config,result):
    hosts_config = yaml.load(file(config["file"], 'r'))
    for host in hosts_config:
        if result.has_key(host):
            result[host].update(hosts_config[host])
        else:
            result[host] = hosts_config[host]
            
    return result