Fix hostname
This commit is contained in:
parent
ac86e51c2d
commit
f8db1c0934
3 changed files with 8 additions and 5 deletions
|
|
@ -14,12 +14,11 @@ ND_PATH = "./network-config"
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
"""Parse the command line arguments"""
|
"""Parse the command line arguments"""
|
||||||
|
import pdb;pdb.set_trace()
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument("--password", required=True)
|
parser.add_argument("--password", required=True)
|
||||||
parser.add_argument("--public-key", required=True, type=open)
|
parser.add_argument("--public-key", required=True, type=open)
|
||||||
parser.add_argument(
|
parser.add_argument("--local-hostname", required=True)
|
||||||
"--local-hostname", default="aio3.gpslab.cbr.redhat.com"
|
|
||||||
)
|
|
||||||
parser.add_argument("--user-data", default="./src/virt-install/user-data.tpl", type=open)
|
parser.add_argument("--user-data", default="./src/virt-install/user-data.tpl", type=open)
|
||||||
parser.add_argument("--meta-data", default="./src/virt-install/meta-data.tpl", type=open)
|
parser.add_argument("--meta-data", default="./src/virt-install/meta-data.tpl", type=open)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ def parse_args():
|
||||||
parser.add_argument("-u", "--username", required=True)
|
parser.add_argument("-u", "--username", required=True)
|
||||||
parser.add_argument("-p", "--password", required=True)
|
parser.add_argument("-p", "--password", required=True)
|
||||||
parser.add_argument("-a", "--address", required=True)
|
parser.add_argument("-a", "--address", required=True)
|
||||||
parser.add_argument("-i", "--interface", default="enp1s0")
|
parser.add_argument("-i", "--interface", required=True)
|
||||||
parser.add_argument("-m", "--netmask", default=24)
|
parser.add_argument("-m", "--netmask", default=24)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-d", "--dns", nargs="+", action="append", required=True
|
"-d", "--dns", nargs="+", action="append", required=True
|
||||||
|
|
@ -151,6 +151,11 @@ def main():
|
||||||
deploy.write(deploy_sh(args))
|
deploy.write(deploy_sh(args))
|
||||||
print(f"deploy script written to {args.deploy}")
|
print(f"deploy script written to {args.deploy}")
|
||||||
|
|
||||||
|
print("If you are running on a cloud image remenber to disable cloud-init before running the deploy.")
|
||||||
|
print("sudo systemctl stop cloud-init")
|
||||||
|
print("sudo systemctl disable cloud-init")
|
||||||
|
print("Make sure you have specifed the correct interface to use!")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ ssh_authorized_keys:
|
||||||
- {data.public_key}
|
- {data.public_key}
|
||||||
{data.bootcmd}
|
{data.bootcmd}
|
||||||
runcmd:
|
runcmd:
|
||||||
- "service sshd restart"
|
|
||||||
- "subscription-manager register --username {data.rhn_user} --password '{data.rhn_password}'"
|
- "subscription-manager register --username {data.rhn_user} --password '{data.rhn_password}'"
|
||||||
- "subscription-manager release --set=8.4"
|
- "subscription-manager release --set=8.4"
|
||||||
- "dnf install -y dnf-utils"
|
- "dnf install -y dnf-utils"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue