Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 1.06 KB

README.md

File metadata and controls

39 lines (25 loc) · 1.06 KB

Customized ubuntu image on Hetzner Cloud

Create an Ubuntu 20.04 snapshot on Hetzner Cloud that meets the DevSec Linux Baseline specification.

Configuration management is done via ansible using the os-hardening-roleof the ansible dev-sec collection. Used roles see ansible/requirements.yml

Install packer

packer is a great tool provided by Hashicorp, for more details see Packer by Hashicorp

On macOS using brew

brew install packer

Building

export HCLOUD_TOKEN=<redacted>

# for verbose logging
# export PACKER_LOG=1

packer build hcloud-ubuntu-snapshot.pkr.hcl

Afterwards your can connect via ssh on port 2222.

Managing images

# show all snapshots (customized images)
hcloud image list -t snapshot

# get all images with label ubuntu-snapshot
hcloud image list -o noheader -o "columns=id" -l ubuntu-snapshot