Ansible: Automate Server Configuration

Migration · 06.02.2025
Ansible: Automate Server Configuration

Basic Nginx Playbook

- name: Install nginx
  hosts: webservers
  become: yes
  tasks:
    - apt: name=nginx state=present update_cache=yes
    - systemd: name=nginx state=started enabled=yes
💡 Ansible is idempotent: run the same playbook 10 times and the result stays consistent.
← Back to Knowledge Base Ask Support