Simple Ansible Playbook - Ansible Typing CST Test
Loading…
Simple Ansible Playbook — Ansible Code
A simple Ansible playbook to install and start Nginx on a remote server.
# ansible/demo.yml
- name: Install and start Nginx
hosts: webservers
become: yes
tasks:
- name: Install Nginx
apt:
name: nginx
state: present
- name: Start Nginx service
service:
name: nginx
state: started
enabled: yesAnsible Language Guide
Ansible is an open-source automation tool for IT orchestration, configuration management, application deployment, and infrastructure as code. It uses simple YAML-based playbooks to automate complex IT workflows.
Primary Use Cases
- ▸Provisioning cloud infrastructure
- ▸Automating server configuration
- ▸Deploying applications and updates
- ▸Network device configuration and monitoring
- ▸Continuous delivery and DevOps workflows
Notable Features
- ▸Agentless architecture
- ▸YAML-based declarative syntax
- ▸Idempotent operations
- ▸Extensible modules and plugins
- ▸Supports both push and pull automation
Origin & Creator
Created by Michael DeHaan in 2012 and later maintained by Red Hat, to simplify configuration management and orchestration compared to Puppet/Chef.
Industrial Note
Ansible is widely used in DevOps, cloud automation, network automation, hybrid cloud orchestration, and IT compliance in enterprise and industrial IT environments.