Ansible configuration repo to configure a variety of Debian servers.
  • Shell 64.1%
  • Jinja 35.9%
Find a file
2026-06-10 16:05:40 -07:00
.ansible_cache feat: add a cache for Ansible 2026-01-30 17:05:01 -08:00
inventories feat: overhaul docker config 2026-06-10 15:03:28 -07:00
logs feat: add empty logs/ directory 2025-09-14 08:23:22 -07:00
roles feat: add Forgejo role/setup 2026-06-10 16:05:40 -07:00
vault fix: overhaul setup_podman role 2026-06-10 14:21:55 -07:00
.editorconfig fix: update how roles are declared in playbooks 2026-01-30 17:06:23 -08:00
.gitignore feat: add empty logs/ directory 2025-09-14 08:23:22 -07:00
ansible.cfg feat: add bootstrap_ansible_user.yml 2026-04-10 17:14:57 -07:00
bootstrap_ansible_user.yml feat: add bootstrap_ansible_user.yml 2026-04-10 17:14:57 -07:00
dbservers.yml feat: overhaul user management 2026-03-15 10:11:03 -07:00
delete_specific_user.yml feat: add playbook to delete a user 2026-04-10 17:07:07 -07:00
homelab_services.yml feat: add homelab_services host/playbook 2026-03-30 16:48:28 -07:00
LICENSE misc: add LICENSE 2025-09-10 20:14:01 -07:00
package_updates.yml fix: update how roles are declared in playbooks 2026-01-30 17:06:23 -08:00
README.md docs: update README.md 2026-05-02 18:26:25 -07:00
requirements.yml misc: clean up files 2025-09-19 15:33:37 -07:00
reverse_proxies.yml feat: overhaul user management 2026-03-15 10:11:03 -07:00
site.yml feat: add setup_docker 2025-12-29 21:48:22 -08:00
webservers.yml feat: add Forgejo role/setup 2026-06-10 16:05:40 -07:00

Ansible Configuration

This Ansible project provides a modular and extensible framework to automate the provisioning, hardening, and management of (primarily Debian) servers.

Overview

The project includes roles and playbooks to:

  • Create a dedicated Ansible user
  • Configure and secure system access
  • Manage users and permissions
  • Harden SSH and firewall settings
  • Install and update essential packages and software
  • Automate system updates, security patches, and service restarts
  • Install and configure Podman for container management with rootless best practices
  • Configure system-level settings like timezone and hostname

Structure

  • Inventories: Environment-specific host and variable definitions
  • Roles: Reusable components encapsulating logical configuration units
  • Playbooks: Top-level orchestration scripts invoking roles and tasks
  • Vault: Secure storage of sensitive credentials and secrets

Dependencies

This project has a requirements.yml file that outlines any extra/third-party modules that are required. These dependencies can be installed by running the following:

ansible-galaxy collection install -r requirements.yml

Note: installing Ansible via Homebrew installs a lot of extra modules. You can check what modules you already have installed by running the following:

ansible-galaxy collection list

Features

  • Environment-aware configuration for staging, production, and more
  • Support for encrypted secrets using Ansible Vault
  • Automated security hardening including fail2ban and firewall configuration
  • User management with enforced password policies
  • Package and service management tailored for Debian-based systems
  • Automated system updates with service restarts and conditional reboots to keep servers up-to-date and secure

Getting Started

  1. Define your inventory and environment-specific variables.
  2. Customize variables and credentials securely using Ansible Vault.
  3. Run playbooks targeting your infrastructure to apply configurations.
  4. Extend by adding new roles and playbooks as your environment grows.

Requirements

  • Ansible 2.18+
    • Note: this might work on older versions of Ansible, but it was developed using Ansible 2.18.
  • Debian 13 or newer servers
  • Access with sufficient privileges to perform configuration changes

Contributions

If you have any suggestions or fixes for this repository, feel free to open an issue to discuss it further.

License

Copyright (c) 2025 Ryan Hendrickson. Released under the MIT License. See LICENSE for details.


This project is designed to be flexible and easily expandable to accommodate evolving operational needs. Contribution and customization are encouraged to fit specific deployment scenarios. For detailed usage, role descriptions, and examples, consult the documentation and inline comments within the project files.