Reading from Docker and Swarm
This commit is contained in:
parent
b196905320
commit
b7ec691e8f
7 changed files with 63 additions and 14 deletions
|
|
@ -3,12 +3,12 @@ import sys
|
|||
from easymapping import HaproxyConfigGenerator
|
||||
|
||||
if len(sys.argv) != 2:
|
||||
print("You need to pass the easyconfig.cfg path")
|
||||
print("You need to pass the easyconfig.yml path")
|
||||
exit(1)
|
||||
|
||||
|
||||
with open(sys.argv[1], 'r') as content_file:
|
||||
parsed = yaml.load(content_file.read())
|
||||
parsed = yaml.load(content_file.read(), Loader=yaml.FullLoader)
|
||||
|
||||
cfg = HaproxyConfigGenerator(parsed)
|
||||
print(cfg.generate())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue