Skip to content

Commit

Permalink
Merge pull request chriswayg#6 from lunarops/update-template/ubuntu-2…
Browse files Browse the repository at this point in the history
…0.04

Updated Ubuntu Packer template
  • Loading branch information
dalekurt authored May 29, 2021
2 parents 69d8371 + 4fe6218 commit afc63c0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
4 changes: 4 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ function die_var_unset {
[[ -f $build_conf ]] || { echo "User variables file '$build_conf' not found."; exit 1; }
source $build_conf

[[ -z "$vm_name" ]] && die_var_unset "vm_name"
[[ -z "$vm_default_user" ]] && die_var_unset "vm_default_user"
[[ -z "$vm_memory" ]] && die_var_unset "vm_memory"
[[ -z "$vm_cores" ]] && die_var_unset "vm_cores"
[[ -z "$vm_sockets" ]] && die_var_unset "vm_sockets"
[[ -z "$ssh_username" ]] && die_var_unset "ssh_username"
[[ -z "$proxmox_host" ]] && die_var_unset "proxmox_host"
[[ -z "$proxmox_user" ]] && die_var_unset "proxmox_user"
[[ -z "$proxmox_storage_vm" ]] && die_var_unset "proxmox_storage_vm"
Expand Down
4 changes: 4 additions & 0 deletions ubuntu-20.04-amd64-proxmox/build.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
vm_name=tmpl-ubuntu-20.04
vm_default_user=lunarops-user
vm_memory=1024
vm_cores=1
vm_sockets=0
ssh_username=root
default_vm_id=100 # default VM ID for Ubuntu
proxmox_url=https://pve0.internal.lunarops.net:8006/api2/json
proxmox_host=pve0
Expand Down
4 changes: 2 additions & 2 deletions ubuntu-20.04-amd64-proxmox/playbook/server-template-vars.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

iserver_hostname: ubuntu2004-kvm
iserver_sshkey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDvmo1mPwxdRCw6f76w/Mkxm4WK4ulsgFpSPJxuvBmKZb8ls9vUAO4vUaFSa+e8eFFqnKZUepOOJc2mLDYBBI1n7CRZuGvuS0YMnNzGgE8TpX8rQ3GHAJMdU5nv6PPs9rZcqPI3l7piXHlvngnETWhY5PrJcmXEyysvnaIv2wTb2J7084OUC2eelxpqLwkZg4iQlJc0CNO/km/onme4LgEooBi7c7hXfIbeMrHVQa66dorri6cH79GmV6DPljiWR7ELgIydbsD/b7WnVaQozjYZxvhgJ11ki5Pc7V3+1PocjLkd5rUnxpO4lI6EoEUXMTZL299VUDQyQOVOYoCEtjbfb2HSmLSsIWv7x4amtYkaJ9DP+ij8mMiMXB0JEpNF3bfzzCZVcDYt3piTpIBYC6sHaX3JddzZZqM8PxOAVkI1D/d/qMfZbFd2QQI15ozG6wYAVW4KFbe8I+GR1/aLPKx30rqZsfcqEi7Phk32gyu5btLwrQdyIz9ib3+ZsgGbZL0= lunarops_user@lunarops.io
iserver_hostname: ubuntu
iserver_sshkey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDvmo1mPwxdRCw6f76w/Mkxm4WK4ulsgFpSPJxuvBmKZb8ls9vUAO4vUaFSa+e8eFFqnKZUepOOJc2mLDYBBI1n7CRZuGvuS0YMnNzGgE8TpX8rQ3GHAJMdU5nv6PPs9rZcqPI3l7piXHlvngnETWhY5PrJcmXEyysvnaIv2wTb2J7084OUC2eelxpqLwkZg4iQlJc0CNO/km/onme4LgEooBi7c7hXfIbeMrHVQa66dorri6cH79GmV6DPljiWR7ELgIydbsD/b7WnVaQozjYZxvhgJ11ki5Pc7V3+1PocjLkd5rUnxpO4lI6EoEUXMTZL299VUDQyQOVOYoCEtjbfb2HSmLSsIWv7x4amtYkaJ9DP+ij8mMiMXB0JEpNF3bfzzCZVcDYt3piTpIBYC6sHaX3JddzZZqM8PxOAVkI1D/d/qMfZbFd2QQI15ozG6wYAVW4KFbe8I+GR1/aLPKx30rqZsfcqEi7Phk32gyu5btLwrQdyIz9ib3+ZsgGbZL0= lunarops-user@lunarops.io
"

iserver_ubuntu_repos:
Expand Down
9 changes: 6 additions & 3 deletions ubuntu-20.04-amd64-proxmox/ubuntu-20.04-amd64-proxmox.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@
"proxmox_storage_iso": "{{env `proxmox_storage_iso`}}",
"iso_filename": "{{env `iso_filename`}}",
"vm_id": "{{env `vm_id`}}",
"vm_name": "ubuntu2004-tmpl",
"vm_name": "{{env `vm_name`}}",
"template_description": "Ubuntu 20.04 x86_64 template built with packer ({{env `vm_ver`}}). Username: {{env `vm_default_user`}}",
"vm_default_user": "{{env `vm_default_user`}}",
"vm_memory": "{{env `vm_memory`}}",
"ssh_username": "root",
"vm_cores": "{{env `vm_cores`}}",
"vm_sockets": "{{env `vm_sockets`}}",
"ssh_username": "{{env `ssh_username`}}",
"ssh_password": "{{env `ssh_password`}}"
},
"sensitive-variables": ["proxmox_password", "ssh_password" ],
Expand Down Expand Up @@ -43,7 +45,8 @@
"vm_name": "{{user `vm_name`}}",
"template_description":"{{user `template_description`}}",
"memory": "{{user `vm_memory`}}",
"cores": "2",
"cores": "{{user `vm_cores`}}",
"sockets": "{{user `vm_sockets`}}",
"os": "l26",
"http_directory": "http",

Expand Down

0 comments on commit afc63c0

Please # to comment.