_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Ansible — Infrastructure as Code without agents

04. 12. 2015 1 min read CORE SYSTEMSai
Ansible — Infrastructure as Code without agents

Twenty servers, each configured differently. Documentation living inside one admin’s head. When they go on holiday, nobody knows how to set up a server. Infrastructure as Code with Ansible changed that — servers are defined in YAML, versioned in git.

Why Ansible

Agentless: Ansible communicates over SSH. No agent on the servers, no daemon, no additional infrastructure. Puppet and Chef require an agent — more software to maintain. YAML: Playbooks in readable YAML. No Ruby (Chef) or DSL (Puppet).

Playbook example

---
- hosts: webservers
  become: yes
  tasks:
    - name: Install Nginx
      apt: name=nginx state=latest
    - name: Deploy config
      template: src=nginx.conf.j2 dest=/etc/nginx/nginx.conf
      notify: Restart Nginx
    - name: Ensure running
      service: name=nginx state=started enabled=yes
  handlers:
    - name: Restart Nginx
      service: name=nginx state=restarted

Idempotence and roles

Every task is idempotent — run the playbook 10 times and the result is the same. Roles organise logic into reusable packages: role nginx, role postgresql, role java. Ansible Galaxy for sharing community roles.

Inventory and dynamic inventory

Static inventory for fixed servers. For cloud environments, a dynamic inventory script that queries the AWS/Azure API and returns the current list of servers.

Servers as code

Ansible is the most accessible path to Infrastructure as Code. Agentless, YAML, SSH. Server documentation lives in git; onboarding means reading the playbook.

ansibleiacautomatizaceprovisioning
Share:

CORE SYSTEMS

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.

Need help with implementation?

Our experts can help with design, implementation, and operations. From architecture to production.

Contact us