Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ifeulner/packer-hcloud-ubuntu
Create an ubuntu snapshot on Hetzner Cloud following the DevSec guidelines
https://github.com/ifeulner/packer-hcloud-ubuntu
ansible devsec hashicorp hetzner hetzner-cloud os-hardening packer
Last synced: 3 months ago
JSON representation
Create an ubuntu snapshot on Hetzner Cloud following the DevSec guidelines
- Host: GitHub
- URL: https://github.com/ifeulner/packer-hcloud-ubuntu
- Owner: ifeulner
- License: mit
- Created: 2022-10-14T13:11:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-14T19:11:22.000Z (over 2 years ago)
- Last Synced: 2024-10-12T22:29:25.094Z (4 months ago)
- Topics: ansible, devsec, hashicorp, hetzner, hetzner-cloud, os-hardening, packer
- Language: HCL
- Homepage:
- Size: 2.93 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Customized ubuntu image on Hetzner Cloud
Create an Ubuntu 20.04 snapshot on [Hetzner Cloud](https://www.hetzner.com/cloud) that meets the [DevSec Linux Baseline](https://github.com/dev-sec/linux-baseline) specification.
Configuration management is done via ansible using the `os-hardening-role`of the [ansible dev-sec collection](https://github.com/dev-sec/ansible-collection-hardening/tree/master/roles/os_hardening).
Used roles see ansible/requirements.yml## Install packer
packer is a great tool provided by Hashicorp, for more details see [Packer by Hashicorp](https://www.packer.io)
On macOS using [brew](https://brew.sh)
```bash
brew install packer
```## Building
```bash
export HCLOUD_TOKEN=# for verbose logging
# export PACKER_LOG=1packer build hcloud-ubuntu-snapshot.pkr.hcl
```Afterwards your can connect via `ssh` on port `2222`.
## Managing images
```bash
# 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
```