2023-04-16 23:12:52 +02:00
|
|
|
# apparmor.d - Full set of apparmor profiles
|
|
|
|
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
|
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
|
|
|
|
# Variables definitions
|
|
|
|
|
|
|
|
variable "username" {
|
|
|
|
description = "Admin username"
|
|
|
|
type = string
|
|
|
|
default = "user"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "password" {
|
|
|
|
description = "Default admin password"
|
|
|
|
type = string
|
|
|
|
default = "user"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "ssh_publickey" {
|
|
|
|
description = "Path to the ssh public key"
|
|
|
|
type = string
|
|
|
|
default = "~/.ssh/id_ed25519.pub"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "ssh_privatekey" {
|
|
|
|
description = "Path to the ssh private key"
|
|
|
|
type = string
|
|
|
|
default = "~/.ssh/id_ed25519"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "disk_size" {
|
2023-07-08 13:34:18 +02:00
|
|
|
description = "Disk size of the VM to build"
|
2023-04-16 23:12:52 +02:00
|
|
|
type = string
|
|
|
|
default = "10G"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "iso_dir" {
|
|
|
|
description = "Original ISO file directory"
|
|
|
|
type = string
|
|
|
|
default = "/var/lib/libvirt/images"
|
|
|
|
}
|
|
|
|
|
2023-04-24 13:35:18 +02:00
|
|
|
variable "base_dir" {
|
|
|
|
description = "Final packer image output directory"
|
|
|
|
type = string
|
|
|
|
default = "/var/lib/libvirt/images"
|
|
|
|
}
|
|
|
|
|
2023-07-08 13:34:18 +02:00
|
|
|
variable "firmware" {
|
|
|
|
description = "Path to the UEFI firmware"
|
|
|
|
type = string
|
|
|
|
default = "/usr/share/edk2-ovmf/x64/OVMF_CODE.fd"
|
|
|
|
}
|
|
|
|
|
2023-04-16 23:12:52 +02:00
|
|
|
variable "output" {
|
|
|
|
description = "Output build directory"
|
|
|
|
type = string
|
|
|
|
default = "/tmp/packer"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "prefix" {
|
|
|
|
description = "Image name prefix"
|
|
|
|
type = string
|
2023-04-24 13:35:18 +02:00
|
|
|
default = "aa-"
|
2023-04-16 23:12:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "version" {
|
|
|
|
description = "apparmor.d version"
|
|
|
|
type = string
|
|
|
|
default = "0.001"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "flavor" {
|
2023-04-24 13:35:18 +02:00
|
|
|
description = "Distribution flavor to use (server, desktop, gnome, kde...)"
|
2023-04-16 23:12:52 +02:00
|
|
|
type = string
|
|
|
|
default = ""
|
|
|
|
}
|
2023-04-24 13:35:18 +02:00
|
|
|
|
|
|
|
variable "release" {
|
|
|
|
description = "Distribution metadata to use"
|
|
|
|
type = map(object({
|
|
|
|
codename = string
|
|
|
|
version = string
|
|
|
|
}))
|
|
|
|
default = {
|
|
|
|
"ubuntu" : {
|
|
|
|
codename = "jammy",
|
|
|
|
version = "22.04.2",
|
|
|
|
},
|
|
|
|
"debian" : {
|
2023-07-08 13:34:18 +02:00
|
|
|
codename = "bookworm",
|
|
|
|
version = "12",
|
2023-04-24 13:35:18 +02:00
|
|
|
}
|
|
|
|
"opensuse" : {
|
|
|
|
codename = "tumbleweed",
|
|
|
|
version = "",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|