{"id":9027,"date":"2020-01-20T07:42:00","date_gmt":"2020-01-20T07:42:00","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=9027"},"modified":"2021-11-13T07:06:42","modified_gmt":"2021-11-13T07:06:42","slug":"ansible-interview-questions-and-answer-part-10","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/ansible-interview-questions-and-answer-part-10\/","title":{"rendered":"Ansible Interview Questions and Answer \u2013 Part 10"},"content":{"rendered":"\n<p><strong>How would you ensure your application is configured correctly for different types of tests?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>This is not possible.<\/li><li><strong>Create multiple configuration files for your application, one per type of test. (Ans)<\/strong><\/li><li>Use multiple machines, one per type of test.<\/li><li>Clone multiple copies of your application, one per type of test. <\/li><\/ul>\n\n\n\n<p><strong>Which statement best describes Docker Compose?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A file that describes how to build a single Docker image<\/li><li>Tooling that allows you to build a hierarchy of Docker images<\/li><li><strong>Tooling that describes a multi-container environment and runs services in that environment (Ans)<\/strong><\/li><li>A file that describes a multi-container environment<\/li><\/ul>\n\n\n\n<p><strong>What format is used for AWS CloudFormation templates?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>JavaScript<\/li><li>Groovy<\/li><li><strong>JSON  (Ans)<\/strong><\/li><li>YAML <\/li><\/ul>\n\n\n\n<p><strong>When you install a source distribution, which of the following tasks is required?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The distribution is extracted and copied to the target file system<\/li><li>The application source is built<\/li><li><strong>All of these (Ans)<\/strong><\/li><li>The application source is compiled <\/li><\/ul>\n\n\n\n<p><strong>Which of the following describes how the Ansible module typically operates when using AWS modules?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Ansible connects to your local machine using a local connection, which then communicates with AWS services. (Ans)<\/strong><\/li><li>Ansible connects to a remote host using HTTP, which then communicates with AWS services.<\/li><li>Ansible connects to a remote host using SSH, which then communicates with AWS services.<\/li><li>Ansible connects to your local machine using SSH, which then communicates with AWS services.  <\/li><\/ul>\n\n\n\n<p><strong>Which of the following are examples of clean up commands in a Docker Compose environment?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>docker-compose kill<\/li><li><strong>All of these (Ans)<\/strong><\/li><li>docker-compose run &#8211;rm<\/li><li>docker-compose rm<\/li><\/ul>\n\n\n\n<p><strong>Which of the following is created during the build stage?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Application Artifacts (Ans)<\/strong><\/li><li>Docker Images<\/li><li>Virtual Machine Images<\/li><li>All of these<\/li><\/ul>\n\n\n\n<p><strong>Which metadata property lists the current tags associated with an image? <\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>CurrentLabels<\/li><li><strong>RepoTags (Ans)<\/strong><\/li><li>CurrentTags  <\/li><li>RepoLabels <\/li><\/ul>\n\n\n\n<p><strong>Which of the following represents the lowest level of automation in the continuous delivery workflow?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>docker-compose commands<\/li><li>docker commands<\/li><li>make commands<\/li><li><strong>Dockerfile directives (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>Which of the following is used to automate creation of multi-container environments?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Docker Compose (Ans)<\/strong><\/li><li>Docker Machine<\/li><li>Docker Engine<\/li><li>Docker Client <\/li><\/ul>\n\n\n\n<p><strong>What is the first stage of a continuous delivery workflow?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Test (Ans)<\/strong><\/li><li>Build<\/li><li>Release<\/li><li>Deploy <\/li><\/ul>\n\n\n\n<p><strong>You would NOT typically use changes to the <em><em>_<\/em><\/em> as a trigger for your continuous delivery workflow.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Application source code<\/li><li>Parent image of your base image<\/li><li><strong>Development image (Ans)<\/strong><\/li><li>Base image <\/li><\/ul>\n\n\n\n<p><strong>What form of testing is performed during the release phase of continuous delivery?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Integration testing<\/li><li>Manual testing<\/li><li><strong>Acceptance testing  (Ans)<\/strong><\/li><li>Unit testing <\/li><\/ul>\n\n\n\n<p><strong>What is the best approach to speed up the installation process of application dependencies in a Docker container?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Create a cache folder in the container to cache downloaded dependencies.<\/li><li>Use a faster computer.<\/li><li><strong>Use a volume container to cache downloaded dependencies. (Ans)<\/strong><\/li><li>Use a faster Internet connection. <\/li><\/ul>\n\n\n\n<p><strong>Which type of character is required to separate rules in a make target?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Space<\/li><li><strong>Tab (Ans)<\/strong><\/li><li>Comma<\/li><li>Colon <\/li><\/ul>\n\n\n\n<p><strong>When is it acceptable to use volume mappings?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>All of these<\/li><li>When you need to exchange files between Docker containers and the Docker Client<\/li><li>When you need to exchange files between Docker containers and the Docker Swarm Cluster<\/li><li><strong>When you need to exchange files between Docker containers and the Docker Host  (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>Which docker-compose command can be used to override the settings of a defined service?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>docker-compose up<\/li><li>docker-compose attach<\/li><li>docker-compose exec<\/li><li><strong>docker-compose run  (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>Which type of volume would you use if you need to persist data across multiple workflow runs?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Internal Volume<\/li><li>Volume Mapping<\/li><li>Volume Container<\/li><li><strong>External Volume (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>Which of the following are examples of initialisation tasks you need to perform in the release environment?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Adding a required operating system package to the base image<\/li><li>Adding a required operating system package to the parent image<\/li><li>All of these<\/li><li><strong>Populating the database with schema, tables and sample data  (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>Which of the following best describes an ECS Task?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>An application process that runs and then exits<\/li><li>An application process that runs continuously<\/li><li>A Docker container that runs continuously<\/li><li><strong>A Docker container that runs and then exits (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>How do you reduce the size of the Docker build context?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Exclude unneeded folders using .dockerignore. (Ans)<\/strong><\/li><li>Exclude unneeded folders in your Dockerfile.<\/li><li>This is not possible.<\/li><li>Exclude unneeded folders using .gitignore. <\/li><\/ul>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_27890\"><iframe loading=\"lazy\"  id=\"_ytid_28199\"  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_27890\"  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>How would you ensure your application is configured correctly for different types of tests? This is not possible. Create multiple configuration files for your application, one per type of test&#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,767,766,482],"class_list":["post-9027","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\/9027","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=9027"}],"version-history":[{"count":3,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9027\/revisions"}],"predecessor-version":[{"id":25054,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/9027\/revisions\/25054"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=9027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=9027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=9027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}