Beheer uw volledige infrastructuur als code met Ansible. Van server provisioning tot application deployment.

Waarom Infrastructure as Code?

  • Reproducibility: Identieke environments via code
  • Version control: Git voor infrastructuur
  • Documentation: Code is documentatie
  • Speed: Minuten ipv dagen voor nieuwe servers
  • Consistency: Geen configuration drift

Ansible Basics

Agentless automation via SSH. Geen software op targets nodig.

Inventory

[webservers]\nweb1.example.com\nweb2.example.com\n\n[databases]\ndb1.example.com\n

Playbook

---\n- name: Configure webservers\n  hosts: webservers\n  become: yes\n  tasks:\n    - name: Install Apache\n      apt:\n        name: apache2\n        state: present\n    - name: Start Apache\n      service:\n        name: apache2\n        state: started\n

Best Practices

Idempotentie

Playbooks kunnen meerdere keren draaien zonder side effects.

Roles

Herbruikbare componenten:

  • webserver (Apache/Nginx)
  • database (MySQL/PostgreSQL)
  • firewall (UFW/firewalld)
  • monitoring (Prometheus)

Vault voor Secrets

# Encrypt sensitive vars\nansible-vault encrypt secrets.yml\n\n# Run with vault\nansible-playbook playbook.yml --ask-vault-pass\n

Real-World Use Cases

  • Server provisioning: Van bare metal naar production in 30 min
  • Configuration management: Consistent settings op 100+ servers
  • Application deployment: Zero-downtime releases
  • Security hardening: Automated CIS benchmark compliance
  • Disaster recovery: Rebuild volledige infrastructuur

5iX Automation

Wij automatiseren uw infrastructuur:

  • Custom Ansible playbooks & roles
  • GitOps workflow (Git als single source of truth)
  • CI/CD pipelines (GitLab, Jenkins)
  • Compliance automation (SOC2, ISO27001)