mirror of
https://github.com/khuedoan/homelab.git
synced 2025-03-10 04:47:09 +07:00
build(scripts): update configure script
This commit is contained in:
parent
66d84c274d
commit
e59ed274ad
35
configure.py
35
configure.py
@ -1,5 +1,8 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# WIP
|
||||
# clean this up
|
||||
|
||||
"""
|
||||
Basic configure script for new users
|
||||
"""
|
||||
@ -14,14 +17,24 @@ if sys.version_info < (3, 10, 0):
|
||||
if platform.system() != 'Linux':
|
||||
raise Exception("Only Linux is supported, please us a Linux VM or switch operating system")
|
||||
|
||||
# TODO
|
||||
# - check if docker installed
|
||||
# - check if make installed
|
||||
# - confirm text editor $EDITOR
|
||||
# - change domain
|
||||
# - change seed repo
|
||||
# - change gitops repo
|
||||
# - add Gitea remote?
|
||||
# - change hardware info
|
||||
os.system(f"{os.getenv('EDITOR')} 'metal/inventories/prod.yml'")
|
||||
# - change Terraform workspace (and make it optional?)
|
||||
# confirm text editor
|
||||
editor = os.getenv('EDITOR')
|
||||
editor = str(input(f"Text editor ({editor}): ") or editor)
|
||||
|
||||
# Replace seed repo
|
||||
seed_repo = "github.com/khuedoan/homelab"
|
||||
seed_repo = str(input(f"Enter seed repo ({seed_repo}): ") or seed_repo)
|
||||
os.system(f"./scripts/replace-gitops-repo {seed_repo}")
|
||||
|
||||
# Replace domain
|
||||
domain = "khuedoan.com"
|
||||
domain = str(input(f"Enter your domain ({domain}): ") or domain)
|
||||
os.system(f"./scripts/replace-domain {domain}")
|
||||
|
||||
# change hardware info
|
||||
os.system(f"{editor} 'metal/inventories/prod.yml'")
|
||||
|
||||
# TODO change Terraform workspace
|
||||
|
||||
# TODO switch to git lib
|
||||
os.system("git diff")
|
||||
|
Loading…
Reference in New Issue
Block a user