How arthur-plazanet/ansible-projects works
Project type and purpose
• This repository is a collection of personal Ansible projects—an Infrastructure-as-Code (IaC) toolkit—for automating server bootstrap, software installation, and monitoring on Ubuntu/Debian droplets.
• It is not a “traditional” application but rather an orchestration platform: playbooks, roles, inventories, templates, handlers, and CI workflows all live in one monorepo.
File structure
Top-level:
• .github/workflows/ansible-lint.yml → CI job to lint your Ansible code
• ansible.cfg, .gitignore, requirements.yml → repo-wide config
• roles/ → shared, reusable roles (common, nginx)
• projects/ → self-contained Ansible “projects,” each with its own playbooks, inventory, and roles
Under projects/:
• common/ → global playbooks and nginx setup, update+reboot tasks
• ubuntu_server_setup/ → playbooks, inventories, roles (ssh, ufw, user) to bootstrap a fresh Ubuntu server
• software/ → installs user-land software (zsh, prezto, nvm, Node/PM2, zellij, neovim); has its own roles & templates
• monitoring/ → role that gathers server metrics and software versions
README for additional insights
• Explains the multi-project structure, use cases, and example commands.
• Emphasizes reusability (common roles), per-project isolation, and Debian/Ubuntu focus.
a. Main components to model
• Developer/CI system (control node)
• GitHub repository (code & CI workflows)
• Ansible core (ansible-playbook, configuration, modules)
• Inventory files (per-project host definitions)
• Role library (shared roles vs project-specific roles)
• Templates and assets folder
• Remote target servers (Ubuntu droplets)
• External services (APT repos, NVM registry, Let’s Encrypt, etc.)
b. Relationships and data flows
1. Developer pushes code → GitHub
2. GitHub Actions lints playbooks/roles
3. Control node (local or CI) runs ansible-playbook:
– Loads ansible.cfg, inventory, variables, vault secrets
– Reads playbook YAML → imports roles, tasks, handlers, templates
– Opens SSH sessions to target servers
– Executes Ansible modules (apt, copy, template, shell, etc.)
4. Remote servers apply configuration, install software, configure nginx, set up monitoring agents
5. Servers may call external package registries (npm, apt), certificate authorities (Let’s Encrypt)
c. Architectural patterns/design principles
• Modular roles (each role has tasks/, handlers/, templates/)
• Multi-project directory layout: separate inventories & playbooks per project
• Common vs project-specific roles for reuse
• Handler pattern for service reloads
• CI-driven linting for quality enforcement
d. Key technologies/frameworks/libraries
• Ansible (core modules, inventory plugins)
• GitHub Actions (ansible-lint)
• Ubuntu/Debian package management (APT)
• NVM & npm registries
• Let’s Encrypt for SSL
• Jinja2 templating