Configuration management with Ansible
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kevin Thierry be26010b20 Init: setup a forgejo git server
- init role to:
  - Set hostname
  - Harden SSH conf
  - Create the default user
- nginx role to setup an NginX service in a podman container
- forgejo role to setup a Forgejo service in a podman container
- forgejo playbook to setup a Forgejo git repo
- code.kaiwen.me host
2026-09-07 19:52:02 +07:00
group_vars Init: setup a forgejo git server 2026-09-07 19:52:02 +07:00
host_vars/code.kaiwen.me Init: setup a forgejo git server 2026-09-07 19:52:02 +07:00
playbooks Init: setup a forgejo git server 2026-09-07 19:52:02 +07:00
roles Init: setup a forgejo git server 2026-09-07 19:52:02 +07:00
.gitignore Init: setup a forgejo git server 2026-09-07 19:52:02 +07:00
inventory.yml Init: setup a forgejo git server 2026-09-07 19:52:02 +07:00
LICENSE.txt Init: setup a forgejo git server 2026-09-07 19:52:02 +07:00
README.md Init: setup a forgejo git server 2026-09-07 19:52:02 +07:00

Configuration management with Ansible

Prerequisite:

  • An ansible user with sudo exists on the remote host
  • The ansible_become_password variable must be set to the ansible user password in a vault
  • SSH on the remote servers listens on port 2222.
  • The ansible user can SSH into the remote server without password.

Playbooks

forgejo.yml

Roles

init

Initialize the host with default configurations:

  • Set the hostname
  • SSH hardened configuration
  • Create a default user with sudo

Prerequisite

  • default_user must be defined
  • default_user_password_sha512 must be defined in a vault
  • default_user_ssh_pub_key must be defined in a vault

License

MIT