Manual server admin no longer scales after 10-20 servers.
"Infrastructure as Code"
All changes through Ansible playbooks versioned in Git. Never manual SSH for production.
What we deliver
Git repo with playbooks, AWX with RBAC, CI/CD integration, internal team training.
Example: Ansible playbook
A typical playbook structure with roles, applied to a group of servers:
# site.yml — hardening de baza pe un grup de servere
- hosts: webservers
become: true
roles:
- common # useri, ssh keys, timezone
- hardening # sshd, fail2ban, unattended-upgrades
- nginx
# rulare: ansible-playbook -i inventory site.yml
Inventory + ad-hoc commands
A simple inventory and quick commands without a playbook:
# inventory.ini
[web]
10.0.0.11
10.0.0.12
[db]
10.0.0.20
# comenzi ad-hoc
ansible all -i inventory.ini -m ping
ansible web -i inventory.ini -m apt -a 'name=nginx state=latest' --become
ansible all -i inventory.ini -m shell -a 'uptime'
Secrets with Ansible Vault
You keep passwords encrypted in the repo, decrypted only at run time:
ansible-vault create group_vars/all/vault.yml # editezi criptat
ansible-vault edit group_vars/all/vault.yml
# rulare cu parola vault
ansible-playbook site.yml --ask-vault-pass
# sau cu fisier de parola in CI
ansible-playbook site.yml --vault-password-file ~/.vault_pass
Role structure
A reusable role, with tasks, handlers and templates:
ansible-galaxy init roles/nginx
# roles/nginx/tasks/main.yml
- apt: { name: nginx, state: present }
- template: { src: site.conf.j2, dest: /etc/nginx/sites-enabled/site.conf }
notify: reload nginx
# roles/nginx/handlers/main.yml
- name: reload nginx
service: { name: nginx, state: reloaded }
Safe runs: check, diff, tags
You preview what would change BEFORE, and run only part of it:
ansible-playbook site.yml --check --diff # dry-run + ce se schimba
ansible-playbook site.yml --tags nginx --limit web
ansible-playbook site.yml --start-at-task 'Configure TLS'
ansible-lint site.yml # best practices