{"id":9016,"date":"2020-01-20T07:19:23","date_gmt":"2020-01-20T07:19:23","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=9016"},"modified":"2021-11-13T10:01:16","modified_gmt":"2021-11-13T10:01:16","slug":"ansible-interview-questions-and-answer-part-8","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/ansible-interview-questions-and-answer-part-8\/","title":{"rendered":"Ansible Interview Questions and Answer \u2013 Part 8"},"content":{"rendered":"\n<p><strong>You can merge multiple inventory files to scale out.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>True<\/li><li><strong>False (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>A __ module may be pulled from repository at a future time.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Bronze<\/li><li>Core<\/li><li><strong>Deprecated (Ans)<\/strong><\/li><li>Extra <\/li><\/ul>\n\n\n\n<p><strong>The location with the highest precedence value (most preferred) for configuration options is:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Environment Variable (Ans)<\/strong><\/li><li>It\u2019s the first loaded configuration file.<\/li><li>ansible.cfg in current directory<\/li><li>.ansible.cfg in user home directory <\/li><\/ul>\n\n\n\n<p><strong>What variable type describes the remote host\u2019s system data?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Fact Data Variable (Ans)<\/strong><\/li><li>Dynamic Variable<\/li><li>Host Variable  <\/li><li>Python Data Variable <\/li><\/ul>\n\n\n\n<p><strong>Which of the following transport protocols allows communications for Ansible?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>RDP<\/li><li><strong>SSH (Ans)<\/strong><\/li><li>Telnet<\/li><li>RSH <\/li><\/ul>\n\n\n\n<p><strong>If a host fails a task, it will continue executing the plays.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>False (Ans)<\/strong><\/li><li>True <\/li><\/ul>\n\n\n\n<p><strong>Which component defines the hosts for Ansible to communicate to?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Configuration<\/li><li><strong>Inventory (Ans)<\/strong><\/li><li>Playbook<\/li><li>Modules <\/li><\/ul>\n\n\n\n<p><strong>Which binary executable installs Ansible Galaxy roles?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>ansible-galaxy (Ans)<\/strong><\/li><li>ansible<\/li><li>ansible-playbook<\/li><li>ansible-role<\/li><\/ul>\n\n\n\n<p><strong>If Group1 had: host1, host2, and host3 AND Group2 had: host2, host3, and host6, then the following target pattern would target which hosts?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>host1 and host6<\/li><li><strong>host2 and host3 (Ans)<\/strong><\/li><li>Only Group2 hosts <\/li><li>All hosts in Group1 and Group2 <\/li><\/ul>\n\n\n\n<p><strong>Which of the following functions does Ansible provide?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Storage management<\/li><li><strong>Change management (Ans)<\/strong><\/li><li>Authentication<\/li><li>Certification <\/li><\/ul>\n\n\n\n<p><strong>A play maps <em>__<\/em> to a set of tasks.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>hosts (Ans)<\/strong><\/li><li>a playbook<\/li><li>YAML<\/li><li>variables <\/li><\/ul>\n\n\n\n<p><strong>When building roles, which of the following is how Ansible learns of your files?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Ansible Configuration<\/li><li>Playbooks<\/li><li>YAML file that defines all the locations<\/li><li><strong>Defined directory structure (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>Handlers will execute tasks, but only __.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>if the task fails<\/li><li>when it&#8217;s been notified more than once<\/li><li>if the host allows it<\/li><li><strong>if the task notifies it  (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>What\u2019s the name of the clause to use when choosing whether to run a task?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>When (Ans)<\/strong><\/li><li>If<\/li><li>Where<\/li><li>While <\/li><\/ul>\n\n\n\n<p><strong>Which execution type is the default?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Process<\/li><li>Cloud<\/li><li>Local<\/li><li><strong>Remote (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>Which file is meant to be a playbook for your entire infrastructure?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>ansible.cfg<\/li><li><strong>site.yaml (Ans)<\/strong><\/li><li>main.yaml<\/li><li>root.yaml <\/li><\/ul>\n\n\n\n<p><strong>The command \u201cansible-doc\u201d requires an internet connection to lookup module references.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>True<\/li><li>Only if there is a valid internet connection<\/li><li><strong>False  (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>You can define variables in separate files outside of the inventory file.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Only when you use the INCLUDE statement<\/li><li><strong>True (Ans)<\/strong><\/li><li>False <\/li><\/ul>\n\n\n\n<p><strong>What is the minimum Python version for Ansible Control Server?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Python 3.0<\/li><li>Python 2.4<\/li><li>Python 2.5<\/li><li><strong>Python 2.6  (Ans)<\/strong><\/li><\/ul>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_50407\"><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_54151\"  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_50407\"  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>You can merge multiple inventory files to scale out. True False (Ans) A __ module may be pulled from repository at a future time. Bronze Core Deprecated (Ans) Extra The location with the highest precedence value (most preferred) for configuration options is: Environment Variable (Ans) It\u2019s the first loaded configuration file. ansible.cfg in current directory&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[5038],"tags":[639,767,766,482],"class_list":["post-9016","post","type-post","status-publish","format-standard","hentry","category-ansible","tag-ansible","tag-answer","tag-interview","tag-questions"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9016","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=9016"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9016\/revisions"}],"predecessor-version":[{"id":25059,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9016\/revisions\/25059"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=9016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=9016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=9016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}