{"id":9019,"date":"2020-01-20T07:38:34","date_gmt":"2020-01-20T07:38:34","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=9019"},"modified":"2021-11-13T07:06:55","modified_gmt":"2021-11-13T07:06:55","slug":"ansible-interview-questions-and-answer-part-9","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/ansible-interview-questions-and-answer-part-9\/","title":{"rendered":"Ansible Interview Questions and Answer \u2013 Part 9"},"content":{"rendered":"\n<p><strong>You can add groups inside of groups when:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>You add existing group names under a [groupname:children] definition (Ans)<\/strong><\/li><li>You cannot add groups within groups.<\/li><li>You add existing group names under a [groupname] definition <\/li><\/ul>\n\n\n\n<p><strong>Which statement describes the best approach to integration testing across system boundaries?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Create a single Docker container, run both systems inside the container.<\/li><li>Create a single Docker container for the application, and run the other system on your local machine.<\/li><li>Create a single Docker container for the application, and run the other system in the cloud.<\/li><li><strong>Create a Docker container for each system.  (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>What does the .PHONY directive in a Makefile do?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Ignores files of the same name as the task<\/li><li>Ensures make tasks always run<\/li><li>Provides high-level declaration of all of the make tasks you want to execute<\/li><li><strong>All of these (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>What is the effect of the docker-compose pull command?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>It forces the download of any external image referenced by the image configuration option in each service.<\/li><li><strong>It downloads any external image referenced by the image configuration option in each service, but only if a more up-to-date version exists. (Ans)<\/strong><\/li><li>It downloads all external images, including parent images of services built dynamically, but only if a more up-to-date version exists.<\/li><li>It forces the download of all external images, including parent images of services built dynamically.<\/li><\/ul>\n\n\n\n<p><strong>How do you configure an EC2 Instance to join an EC2 Container Service Cluster?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Add an entry to the ecs.config file on the EC2 Container Service (Ans)<\/strong><\/li><li>Run an Ansible playbook<\/li><li>SSH to the instance and run an ECS init script <\/li><li>Configure this via the EC2 Container Service dashboard <\/li><\/ul>\n\n\n\n<p><strong>How can you use your own custom modules in Ansible playbooks?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Place the modules in a folder called library next to your playbook(s). (Ans)<\/strong><\/li><li>Place the modules in a folder called \/etc\/ansible\/roles on your system.<\/li><li>You can&#8217;t do this. <\/li><li>Fork the Ansible project and add your modules to the appropriate location in the Ansible source.<\/li><\/ul>\n\n\n\n<p><strong>Which of the following is a type of Python-built distribution?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>TAR file<\/li><li>Gzip archive<\/li><li><strong>Wheel (Ans)<\/strong><\/li><li>Package <\/li><\/ul>\n\n\n\n<p><strong>In a Docker-based workflow, how do you ensure the release image has the most up-to-date application artifacts?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Run docker-compose up.<\/li><li>Create a new service that ensures the artifacts are up to date.<\/li><li>You don&#8217;t need to worry about this, it automatically happens.<\/li><li><strong>Run docker-compose build.  (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>Which statement is true about acceptance testing?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Acceptance tests are always defined in an Excel spreadsheet.<\/li><li><strong>You can use a separate project and different language to write your acceptance tests. (Ans)<\/strong><\/li><li>You must always place your acceptance tests in the same project as your application.<\/li><li>You should never automate acceptance tests.<\/li><\/ul>\n\n\n\n<p><strong>Which statement best describes acceptance testing?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Externally focused testing (Ans)<\/strong><\/li><li>Internally focused testing that may test across system boundaries<\/li><li>Internally focused testing that never tests across class boundaries <\/li><li>Internally focused testing that never tests across system boundaries <\/li><\/ul>\n\n\n\n<p><strong>What are the four stages of the continuous delivery workflow?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Develop, Test, Refactor, Deploy<\/li><li>Compile, Build, Package, Deploy<\/li><li>Compile, Test, Build, Release<\/li><li><strong>Test, Build, Release, Deploy  (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>Which type of testing would you NOT typically perform during the release stage?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Performance Testing<\/li><li>Security Testing<\/li><li>Acceptance Testing<\/li><li>Unit and Integration Testing  (Ans) Which of the following represents the highest level of automation in the continuous delivery workflow?<\/li><li>docker commands<\/li><li>docker-compose commands<\/li><li><strong>make commands (Ans)<\/strong><\/li><li>Dockerfile directives<\/li><\/ul>\n\n\n\n<p><strong>What format is used for Jenkins Pipeline scripts?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>YAML<\/li><li>JSON<\/li><li><strong>Groovy (Ans)<\/strong><\/li><li>JavaScript<\/li><\/ul>\n\n\n\n<p><strong>When considering the test and build stages, when should you download application dependencies?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Never<\/li><li><strong>Once, at the beginning of the test stage (Ans)<\/strong><\/li><li>Once, at the beginning of each stage<\/li><li>Whenever dependencies are required<\/li><\/ul>\n\n\n\n<p><strong>How can you capture module and task output in Ansible playbooks?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Use the register action. (Ans)<\/strong><\/li><li>Use the set_fact action.<\/li><li>Use the with_items action.<\/li><li>You can&#8217;t do this. <\/li><\/ul>\n\n\n\n<p><strong>Which statement best describes integration testing?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Internally focused testing that may test across system boundaries (Ans)<\/strong><\/li><li>Internally focused testing that never tests across class boundaries <\/li><li>Internally focused testing that never tests across system boundaries<\/li><li>Externally focused testing <\/li><\/ul>\n\n\n\n<p><strong>When would you want to capture test reports?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>On success or failure (Ans)<\/strong><\/li><li>Never<\/li><li>Only on failure<\/li><li>Only on success <\/li><\/ul>\n\n\n\n<p><strong>What is the most effective way to install the latest version of Ansible?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>From the latest source<\/li><li>Using your operating system package manager<\/li><li><strong>Using Python&#8217;s package manager called PIP (Ans)<\/strong><\/li><li>Download from Ansible <\/li><\/ul>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_17238\"><iframe loading=\"lazy\"  id=\"_ytid_76205\"  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_17238\"  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>You can add groups inside of groups when: You add existing group names under a [groupname:children] definition (Ans) You cannot add groups within groups. You add existing group names under&#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":[5038],"tags":[639,641,766,482],"class_list":["post-9019","post","type-post","status-publish","format-standard","hentry","category-ansible","tag-ansible","tag-answers","tag-interview","tag-questions"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9019","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=9019"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9019\/revisions"}],"predecessor-version":[{"id":25055,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9019\/revisions\/25055"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=9019"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=9019"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=9019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}