27 lines
1.0 KiB
Python
27 lines
1.0 KiB
Python
import argparse
|
|
import logging
|
|
|
|
from src import main
|
|
|
|
if __name__ == '__main__':
|
|
parser = argparse.ArgumentParser(description="Deploy JSON file as LXCs and VMs to your proxmox server")
|
|
parser.add_argument("-v", "--verbose", help="increase output verbosity", action="store_true")
|
|
|
|
parser.add_argument("--host", help="host to use for ssh", type=str)
|
|
parser.add_argument("--username", help="username to use for ssh (default: root)", type=str, default="root")
|
|
parser.add_argument("--port", help="port to use for ssh (default: 22)", type=str, default=22)
|
|
|
|
parser.add_argument("--repo", help="git repo to clone", type=str)
|
|
parser.add_argument("path", help="path where your repo is cloned or will be cloned", type=str)
|
|
|
|
args = parser.parse_args()
|
|
|
|
# Set logging level
|
|
if args.verbose:
|
|
logging.basicConfig(format='[%(levelname)s] : %(message)s', level=logging.DEBUG)
|
|
else:
|
|
logging.basicConfig(format='[%(levelname)s] : %(message)s', level=logging.INFO)
|
|
|
|
# Run the main program
|
|
main.run(args)
|