{"id":21169,"date":"2021-04-25T18:17:06","date_gmt":"2021-04-25T18:17:06","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=21169"},"modified":"2021-10-28T06:37:12","modified_gmt":"2021-10-28T06:37:12","slug":"test-your-ansible-knowledge-ansible-interview-questions-and-answer","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/test-your-ansible-knowledge-ansible-interview-questions-and-answer\/","title":{"rendered":"Test Your Ansible Knowledge: Ansible Interview Questions and Answer"},"content":{"rendered":"\n<ol class=\"wp-block-list\"><li>What is Configuration Management?<\/li><li>List a few available configuration management tools.<\/li><li>What is Ansible? List some of major advantages of using Ansible.<\/li><li>Write down the data flow of Ansible.<\/li><li>What is the major difference between scripting langugage and Ansible?<\/li><li>What do you understand by the term IaC?<\/li><li>What is idempotency? Is it a useful feature of Ansible?<\/li><li>List down the most commonly used Ansible terms in Ansible ecosystem.<\/li><li>What are the pre-requisites to install Ansible?<\/li><li>Perform Ansible installation and configuration setup on CentOS and Debian.<\/li><li>Execute \u201cansinble &#8211;version\u201d to check installed Ansible version.<\/li><li>What is the precedence order of Ansible to identify valid Ansible Configuration File?<\/li><li>Perform password-based and key-based authentication setup for two different Managed Nodes.<\/li><li>Perform a ping test on Managed Node from Ansible Controller Node to confirm Ansible Communication.<\/li><li>What are modules? How many type of modules are three in Ansible?<\/li><li>Execute a command to list down all of the available \u201cCore Modules\u201d in Ansible.<\/li><li>Create a user named \u201cyogesh\u201d with uid \u201c9876\u201d and shell \u201c\/bin\/bash\u201d on Managed Nodes using Ad-hoc Ansible execution.<\/li><li>Install a package named \u201ctelnet or talk or git\u201d on Managed Nodes using Ad-hoc Ansible execution.<\/li><li>Create a simple script to create a file and directory and execute it on Managed Nodes using Ansible Ad-hoc execution with appropriate Ansible Module.<\/li><li>What do you understand by Privilege Escalation in Ansible?<\/li><li>What is YAML language? What are the three simple rules to remember about YAML in Ansible?<\/li><li>What are Playbooks? List the major portions used in any Playbook.<\/li><li>What do you understand by Play?<\/li><li>What are tasks?<\/li><li>Create a Playbook to install and configure \u201cwebserver, I.e., httpd\/apache\u201d. Use Package, File, and Service Modules. Make sure to get output as \u201cThis is my First &#8211; Playbook in Ansible\u201d on browser.<\/li><li>Create a Playbook for \u201cmotd file\u201d and use different variables to configure the file.<\/li><li>What is the purpose of Debug Module in Ansible?<\/li><li>What is the importance of Register variable in Ansible?<\/li><li>Create another \u201cmotd file\u201d and use different facts generated by Ansible to configure the file.<\/li><li>Create another \u201cmotd file\u201d and use both user-defined variables and Facts to configure the file.<\/li><li>Create a user named \u201cyogeshraheja\u201d using Ansible Statements with conditions CentOS is having version 7.x and Ubuntu is having version 16.x.<\/li><li>Create a playbook to install \u201cmysql\u201d server and all its dependencies like php, nginx using Ansible loops.<\/li><li>What is the special purpose of notify in Ansible?<\/li><li>Use the Handler section inside the Playbook create earlier in Chapter 5, Ansible Playbooks (under Tast You Knowledge section) for \u201cwebserver i.e httpd\/apache\u201d and run it after changing \u201cfile\u201d module with \u201cthis is my First Playbook with Handler Section\u201d.<\/li><li>What are Ansible Roles and why are they Important?<\/li><li>What is a command to create a base directory structure for Ansible Roles?<\/li><li>Create an Ansible Roles for \u201cWebserver\u201d server using tasks, variables, facts, and handlers.<\/li><li>How can one define dependencies in Ansible Roles?<\/li><li>What is Ansible galaxy?<\/li><li>Create your Ansible Galaxy Account.<\/li><li>Login and explore Ansible Galaxy site \u2013 https:\/\/galaxy.ansible.com\/<\/li><li>Search, install, and use Ansible Role named \u201cdocker-test\u201d from Ansible Galaxy.<\/li><li>Create and run a Playbook with two different tasks using Copy and Fetch modules.<\/li><li>What do you understand by fork and serial attributes in Ansible?<\/li><li>Create and run a Playbook to ignore failed operation errors and proceed further with tasks operations.<\/li><li>What is Ansible Tower?<\/li><li>Perform an installation and configuration of Ansible Tower with free 10 node offerings given by RedHat.<\/li><li>Log in and explore Ansible Tower.<\/li><\/ol>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_93506\"><figure class=\"wp-block-embed wp-block-embed-youtube is-type-video is-provider-youtube epyt-figure\"><div class=\"wp-block-embed__wrapper\"><iframe loading=\"lazy\"  id=\"_ytid_14081\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_93506\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><\/div><\/figure><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>What is Configuration Management? List a few available configuration management tools. What is Ansible? List some of major advantages of using Ansible. Write down the data flow&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[2],"tags":[],"class_list":["post-21169","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/21169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=21169"}],"version-history":[{"count":4,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/21169\/revisions"}],"predecessor-version":[{"id":24428,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/21169\/revisions\/24428"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=21169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=21169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=21169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}