Ansible Playbook Beginners Tutorial // Create Your First Playbook To Install Apache Server - Part 1

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.พ. 2025
  • #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:
    • Ansible Tutorial | Is ...
    ------------------------------------------------------------------------------------------
    -----------------------------------------------------------------------------------------
    Ansible AdHoc Commands:
    • Ansible Ad Hoc Command...
    ---------------------------------------------------------------------------------------
    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 @:
    / thetips4you
    / @thetips4you
    / thetipsforyou
    www.thetips4you...
    =============================================
    Music credit: "Royalty Free Music from Bensound"

ความคิดเห็น • 3

  • @mathewkargarzadeh3158
    @mathewkargarzadeh3158 3 ปีที่แล้ว +1

    Liked the variable part. I am taking notes. Thanks Much !. Mat

    • @Thetips4you
      @Thetips4you  3 ปีที่แล้ว +1

      Great Mat. Thank you.

  • @whoaMI-mi9hb
    @whoaMI-mi9hb 4 ปีที่แล้ว

    Aim: Pull System details - h/w and OS details with last boot
    Host : 1 linux server (centos / ubuntu) , 1 Windows 2016/2019
    Domain: Both these servers are deployed in AwS and local Oracle VirtualBox without having any domain connectivity
    Trying to get required info using playbook and export to excel.
    1. How to export output to excel thru Ansible ?
    2. How to filter ansible facts output
    Problem faced: Inventory file having both windows and linux server but not able to ping Windows client machine from Ansible Controller (Ubuntu) but linuc machine pinging.
    In AwS , WinRm port allowed - 5985. For Windows client - win_ping used but not working. Can you please suggest