{"id":6868,"date":"2019-10-07T08:03:13","date_gmt":"2019-10-07T08:03:13","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=6868"},"modified":"2021-11-16T07:13:01","modified_gmt":"2021-11-16T07:13:01","slug":"ansible-interview-questions-and-answer-part-3","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/ansible-interview-questions-and-answer-part-3\/","title":{"rendered":"Ansible Interview Questions and Answer &#8211; Part 3"},"content":{"rendered":"\n<ol class=\"wp-block-list\"><li>What are handlers used for in ansible and how is it diffrent from tasks?<\/li><li>Conditional execution in ansible is used for what purpose and write down its syntax with small description?<\/li><li>What are templates used for and its format?<\/li><li>What are ansible roles and its purpose?<\/li><li>Command to generate ansible roles directory structure.<\/li><li>Name 5 directories from ansible roles.<\/li><li>What is {{ }} symbol used for in ansible.<\/li><li>Write down all the places where we can define variables according to its precedence.<\/li><li>Setup module gets executed after executing any ad hoc command. True or False<\/li><li>Anible playbooks are written in XML format. True or False<\/li><li>ansible.cfg file is list of plays. True or False<\/li><li>Fact variables is generated by ansible and we do not need to create fact varibales. True or False<\/li><li>Anible is written in Python langueage. True or False<\/li><li>Ansible works on Master and client relationship, where ansible control server package is installed on master and ansible client package is installed on all the clients. True or False<\/li><li>Ansible loop module is with_items. True or False<\/li><li>All the templates in ansible roles has to be defined in main.yml file inside templates directory. True or False<\/li><li>All the roles uploaded in ansible galaxy website is written and owned by Ansible inc(organization). <\/li><li>Ansible can only get installed on Linux machine but can manage Linux and windows nodes. True or False<\/li><li>Write a Ansible task that can copy the file to remote location with the ownership of Jboss?<\/li><\/ol>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_11028\"><iframe loading=\"lazy\"  id=\"_ytid_34231\"  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_11028\"  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 class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>What are handlers used for in ansible and how is it diffrent from tasks? Conditional execution in ansible is used for what purpose and write down its syntax with small&#8230; <\/p>\n","protected":false},"author":1,"featured_media":8347,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[5038],"tags":[],"class_list":["post-6868","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ansible"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/6868","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=6868"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/6868\/revisions"}],"predecessor-version":[{"id":25406,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/6868\/revisions\/25406"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/8347"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=6868"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=6868"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=6868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}