Playbooks are Ansible’s configuration, deployment, and orchestration language. They can describe a policy you want your remote systems to enforce, or a set of steps in a general IT process. Playbooks are designed to be human-readable and are developed in a basic text language.

Playbooks are expressed in YAML format and have a minimum of syntax, which intentionally tries to not be a programming language or script, but rather a model of a configuration or a process.

Example:


– hosts: webservers
remote_user: root
tasks:
– name: Install httpd
yum:
name: httpd
state: present
– name: Ensure httpd is running
service:
name: httpd
state: started
enabled: yes

Leave a Reply

Your email address will not be published. Required fields are marked *