2023-06-14 16:30:17 +02:00
|
|
|
import argparse
|
2023-06-09 11:49:51 +02:00
|
|
|
import logging
|
|
|
|
|
|
|
|
from src import main
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2023-06-15 16:25:47 +02:00
|
|
|
parser = argparse.ArgumentParser(description="Deploy JSON file as LXCs and VMs to your proxmox server")
|
2023-06-14 16:30:17 +02:00
|
|
|
parser.add_argument("-v", "--verbose", help="increase output verbosity", action="store_true")
|
|
|
|
|
2023-06-15 16:25:47 +02:00
|
|
|
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)
|
2023-06-14 16:30:17 +02:00
|
|
|
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
2023-06-15 16:25:47 +02:00
|
|
|
# Set logging level
|
2023-06-14 16:30:17 +02:00
|
|
|
if args.verbose:
|
|
|
|
logging.basicConfig(format='[%(levelname)s] : %(message)s', level=logging.DEBUG)
|
|
|
|
else:
|
|
|
|
logging.basicConfig(format='[%(levelname)s] : %(message)s', level=logging.INFO)
|
|
|
|
|
2023-06-15 16:25:47 +02:00
|
|
|
# Run the main program
|
|
|
|
main.run(args)
|