Skip to content

ifeulner/packer-hcloud-ubuntu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Create an ubuntu snapshot on Hetzner Cloud following the DevSec guidelines

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published