Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xyhhx/ansible-alpine-docker-host
ansible playbook for configuring an ansible vm as a docker host
https://github.com/xyhhx/ansible-alpine-docker-host
alpine ansible automation docker docker-compose hardening iac infrastructure-as-code security
Last synced: 19 days ago
JSON representation
ansible playbook for configuring an ansible vm as a docker host
- Host: GitHub
- URL: https://github.com/xyhhx/ansible-alpine-docker-host
- Owner: xyhhx
- License: other
- Created: 2024-05-31T06:44:50.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-31T06:50:22.000Z (8 months ago)
- Last Synced: 2024-11-16T00:37:15.968Z (3 months ago)
- Topics: alpine, ansible, automation, docker, docker-compose, hardening, iac, infrastructure-as-code, security
- Language: Jinja
- Homepage: https://git.sr.ht/~xyhhx/ansible-alpine-docker-host
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Alpine Linux Docker Host Playbook
Canonical Source: https://git.sr.ht/~xyhhx/ansible-alpine-docker-host
Mirrors:
[Github](https://github.com/xyhhx/ansible-alpine-docker-host) | [Codeberg](https://codeberg.org/xyhhx/ansible-kicksecure-docker-host)Use these playbooks to configure an Alpine Linux host to run Docker. It features some basic hardening.
This was designed to be used with a KVM/QEMU based virtual machine, but you can modify it quite easily for your needs.
## Usage
### Prerequisites
You need a Linux (or Unix) system with only a few things preinstalled:
- [GNU Make](https://www.gnu.org/software/make/)
- [Ansible](https://www.ansible.com)#### Prerequisites
- Your Alpine host should have `python3` installed
- You should have root access to the server### Set up
1. Generate a random word for my privileged user's username (security through obscurity bla bla bla)
1. Generate an Ed25519 SSH key, take note of the public key
1. Set up the environment vars like so:```sh
cp .env.example .env
# Fill out the env vars
$EDITOR .env
```1. Finally, install the required Ansible Galaxy collections
```sh
make install-requirements
```### Running the playbooks
Just run the following commands and it should just set everything up for ya
```sh
make playbook privileged-user # Only run once
make up
```