32 lines
1.1 KiB
YAML
32 lines
1.1 KiB
YAML
---
|
|
# Main playbook for setting up asxpio servers
|
|
# Usage: ansible-playbook playbooks/setup-servers.yml
|
|
#
|
|
# NOTE: Cloud-init handles base system setup:
|
|
# - System packages (fail2ban, curl, htop, ncdu, tree, etc.)
|
|
# - User management (asxpi + deploy users with sudo and docker access)
|
|
# - SSH hardening (key-only auth, prohibit root password)
|
|
# - Docker installation (docker-ce, docker-ce-cli, containerd.io, docker-compose-plugin)
|
|
# - Bash prompt styling for asxpi user
|
|
# - Docker image pruning cron job
|
|
# - Directory structure creation
|
|
#
|
|
# This playbook handles post-cloud-init verification and additional configuration.
|
|
# Application deployment (Traefik, Forgejo, monitoring, etc.)
|
|
# will be handled via Forgejo Actions pipelines
|
|
|
|
- name: Setup asxpio infrastructure servers
|
|
hosts: asxpio
|
|
become: yes
|
|
gather_facts: yes
|
|
|
|
roles:
|
|
- common
|
|
|
|
post_tasks:
|
|
- name: Display server info
|
|
debug:
|
|
msg: |
|
|
Server {{ inventory_hostname }} post-cloud-init setup complete!
|
|
Role: {{ server_role }}
|
|
Next: Deploy services via Forgejo Actions pipelines
|