#cloud-config
autoinstall:
version: 1
user-data:
hostname: librenms
users:
- name: vagrant
passwd: $6$p7TmlCd1WIljlXVE$B8Yr1f6eVvQrlE5qsk3dp6heo1YveUdXBzXwYY5bhMlbcyl9rvZtH0AkW1ntiE2jgYA8GEQ4vx/lsjxYNwHuK.
lock-passwd: false
groups: sudo
shell: /bin/bash
sudo: "ALL=(ALL) NOPASSWD:ALL"
- name: ubuntu
passwd: $6$p7TmlCd1WIljlXVE$B8Yr1f6eVvQrlE5qsk3dp6heo1YveUdXBzXwYY5bhMlbcyl9rvZtH0AkW1ntiE2jgYA8GEQ4vx/lsjxYNwHuK.
lock-passwd: false
groups: sudo
shell: /bin/bash
sudo: "ALL=(ALL) NOPASSWD:ALL"
locale: en_US
ssh:
allow-pw: true
install-server: true
storage:
layout:
name: lvm
ubuntu-2004.json
{
"builders": [
{
"name": "ubuntu-2004",
"type": "vmware-iso",
"guest_os_type": "ubuntu-64",
"headless": false,
"iso_url": "file://F:\\ubuntu-20.04.2-live-server-amd64.iso",
"iso_checksum": "aba7e22636c435c5008f5d059ae69a62",
"shutdown_command": "sudo systemctl poweroff",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_timeout":"60h",
"ssh_handshake_attempts": "20000",
"http_directory": "http",
"memory": 2048,
"boot_wait": "5s",
"boot_command": [
"<enter><enter><f6><esc><wait> ",
"autoinstall ds=nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/",
"<enter>"
]
}
],
"provisioners": [
{
"destination": "/tmp/librenms.conf",
"source": "files/ubuntu/librenms.conf",
"type": "file"
},
{
"environment_vars": [
"DEBIAN_FRONTEND=noninteractive",
"DESKTOP={{user `desktop`}}",
"UPDATE={{user `update`}}",
"INSTALL_VAGRANT_KEY={{user `install_vagrant_key`}}",
"SSH_USERNAME={{user `ssh_username`}}",
"SSH_PASSWORD={{user `ssh_password`}}",
"http_proxy={{user `http_proxy`}}",
"https_proxy={{user `https_proxy`}}",
"no_proxy={{user `no_proxy`}}",
"LIBRENMS_VERSION={{user `librenms_version`}}",
"OXIDIZED={{user `oxidized`}}",
"SYSLOG_NG={{user `syslog_ng`}}"
],
"execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"expect_disconnect": true,
"scripts": [
"scripts/ubuntu/update.sh",
"scripts/ubuntu/virtualbox.sh",
"scripts/ubuntu/vmware.sh",
"scripts/common/vagrant.sh",
"scripts/common/sshd.sh",
"scripts/ubuntu/librenms.sh",
"scripts/ubuntu/syslog-ng.sh",
"scripts/ubuntu/oxidized.sh",
"scripts/ubuntu/cleanup.sh",
"scripts/common/finish.sh",
"scripts/ubuntu/minimize.sh",
"scripts/common/clean_users.sh"
],
"type": "shell"
}
]
}