1
0
Fork 0
docker-easy-haproxy/static.py
Joao Gilberto Magalhaes b196905320 Directory restructuration
2019-07-17 00:14:58 -05:00

16 lines
320 B
Python

import yaml
import sys
from easymapping import HaproxyConfigGenerator
if len(sys.argv) != 2:
print("You need to pass the easyconfig.cfg path")
exit(1)
with open(sys.argv[1], 'r') as content_file:
parsed = yaml.load(content_file.read())
cfg = HaproxyConfigGenerator(parsed)
print(cfg.generate())
exit(0)