#ansible, #ansibleplaybook, #ansibletutorials Hello Friends, Welcome back to my channel. Today we are going to see another tutorial on Ansible. In my previous videos on ansible , we have setup ansible on centos and ubuntu machines, we have also seen some of the ad-hoc commands that can be used for one time activities. In this video, we will see how we can create ansible playbook. We will start with simple playbooks and as we go on we will create complex playbooks that can be used to run the tasks repeatedly by just running the ansible playbooks.
----------------------------------------------------------------------------------------------
Setup Ansible:
https://youtu.be/tgVdbF4nmyI
------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
Ansible AdHoc Commands:
https://youtu.be/e-GGCjuVy_M
---------------------------------------------------------------------------------------
ansible testservers -m yum -a "name=wget state=present"

---
- name: Install Apache
hosts: testservers
remote_user: root

tasks:
- name: Installing httpd
yum: pkg=httpd state=present

---------------------------------------------------------------------------------------
Installing multiple applications

---
- name: Install apache and wget
hosts: testservers
remote_user: root

tasks:
- name: Installing httpd and wget
yum: pkg={{item}} state=present
with_items:
- httpd
- wget

-------------------------------------------------------------------------------------------
============================================
Follow me @:
https://www.instagram.com/thetips4you
https://www.youtube.com/channel/UCoOq-DtESvayx5yJE5H6-qQ
https://www.facebook.com/thetipsforyou
http://www.thetips4you.com
=============================================
Music credit: "Royalty Free Music from Bensound"