Categories
ansible devops

ansible playbook example

In this post we will see ansible playbook example, Play book is written in yaml format. Inside that we will have multiple tasks and roles

Below is the simple ansible play book with mutiple task

---
- hosts: 10.118.225.56
  tasks:
    - name: first server
      shell: "mkdir /home/host1"	
- hosts: 10.118.225.56
  tasks:
    - name: first server
      shell: "mkdir /home/host1"
- hosts: 10.118.225.56
  tasks:
    - name: first server
      shell: "mkdir /home/host1"
- hosts: 10.118.225.56
  tasks:
    - name: first server
      shell: "mkdir /home/host1"

Related Articles

when condition in ansible playbook

Leave a Reply

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