Configuration management with Ansible
- Jinja 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- 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 |
||
| group_vars | ||
| host_vars/code.kaiwen.me | ||
| playbooks | ||
| roles | ||
| .gitignore | ||
| inventory.yml | ||
| LICENSE.txt | ||
| README.md | ||
Configuration management with Ansible
Prerequisite:
- An
ansibleuser withsudoexists on the remote host - The
ansible_become_passwordvariable must be set to theansibleuser password in a vault - SSH on the remote servers listens on port 2222.
- The
ansibleuser 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_usermust be defineddefault_user_password_sha512must be defined in a vaultdefault_user_ssh_pub_keymust be defined in a vault