How devnotops/ansible works
This repository is a collection of Ansible administration and web-server examples, plus a small PHP login/profile demo. The README’s documented workflow is an operator invoking Ansible against an inventory to run a module on managed hosts. The sampled PHP app separately authenticates users against MySQL, then serves a session-protected profile and logout flow. Other playbooks and deployment configurations are visible in the tree, but their internals were not sampled, so their relationships are left unasserted.
Main entry points: index.php Login and auth · profile.php Protected profile · logout.php Session logout · hosts.ini Host inventory
Components 19
Ansible examples
- Host inventory
hosts.ini - General playbook
main.php - Conditional tasks
playbook_with_when.yml - File module
file_module.yml - MySQL setup
mysql/mysql.yml - PostgreSQL setup
postgresql/create_db_user.yml - Apache role
roles/apache2/tasks/main.yml - Alpine webserver
start_wepserver_alpine.yml
Web examples
- Container deployment
container/main.yml - Container image
container/Dockerfile - Static website
container/website/index.html - Fancy PHP page
main.php
Login demo
- Login and auth
full_docker_websrever/website/index.php - Login database
- Protected profile
full_docker_websrever/website/profile.php - Session logout
full_docker_websrever/website/logout.php
Other components
- Operator
- Ansible CLI
- Web user
Connections 7
- Operator → Ansible CLI: runs commands
README.md - Ansible CLI → Host inventory: targets hosts
README.md - Web user → Login and auth: submits credentials
full_docker_websrever/website/index.php - Login and auth → Login database: queries users
full_docker_websrever/website/index.php - Login and auth → Protected profile: redirects on success
full_docker_websrever/website/index.php - Protected profile → Session logout: links to
full_docker_websrever/website/profile.php - Session logout → Login and auth: redirects to
full_docker_websrever/website/logout.php