Ansible Interview Questions and Answer – Part 9

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 a [groupname] definition

Which statement describes the best approach to integration testing across system boundaries?

  • Create a single Docker container, run both systems inside the container.
  • Create a single Docker container for the application, and run the other system on your local machine.
  • Create a single Docker container for the application, and run the other system in the cloud.
  • Create a Docker container for each system. (Ans)

What does the .PHONY directive in a Makefile do?

  • Ignores files of the same name as the task
  • Ensures make tasks always run
  • Provides high-level declaration of all of the make tasks you want to execute
  • All of these (Ans)

What is the effect of the docker-compose pull command?

  • It forces the download of any external image referenced by the image configuration option in each service.
  • 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)
  • It downloads all external images, including parent images of services built dynamically, but only if a more up-to-date version exists.
  • It forces the download of all external images, including parent images of services built dynamically.

How do you configure an EC2 Instance to join an EC2 Container Service Cluster?

  • Add an entry to the ecs.config file on the EC2 Container Service (Ans)
  • Run an Ansible playbook
  • SSH to the instance and run an ECS init script
  • Configure this via the EC2 Container Service dashboard

How can you use your own custom modules in Ansible playbooks?

  • Place the modules in a folder called library next to your playbook(s). (Ans)
  • Place the modules in a folder called /etc/ansible/roles on your system.
  • You can’t do this.
  • Fork the Ansible project and add your modules to the appropriate location in the Ansible source.

Which of the following is a type of Python-built distribution?

  • TAR file
  • Gzip archive
  • Wheel (Ans)
  • Package

In a Docker-based workflow, how do you ensure the release image has the most up-to-date application artifacts?

  • Run docker-compose up.
  • Create a new service that ensures the artifacts are up to date.
  • You don’t need to worry about this, it automatically happens.
  • Run docker-compose build. (Ans)

Which statement is true about acceptance testing?

  • Acceptance tests are always defined in an Excel spreadsheet.
  • You can use a separate project and different language to write your acceptance tests. (Ans)
  • You must always place your acceptance tests in the same project as your application.
  • You should never automate acceptance tests.

Which statement best describes acceptance testing?

  • Externally focused testing (Ans)
  • Internally focused testing that may test across system boundaries
  • Internally focused testing that never tests across class boundaries
  • Internally focused testing that never tests across system boundaries

What are the four stages of the continuous delivery workflow?

  • Develop, Test, Refactor, Deploy
  • Compile, Build, Package, Deploy
  • Compile, Test, Build, Release
  • Test, Build, Release, Deploy (Ans)

Which type of testing would you NOT typically perform during the release stage?

  • Performance Testing
  • Security Testing
  • Acceptance Testing
  • Unit and Integration Testing (Ans) Which of the following represents the highest level of automation in the continuous delivery workflow?
  • docker commands
  • docker-compose commands
  • make commands (Ans)
  • Dockerfile directives

What format is used for Jenkins Pipeline scripts?

  • YAML
  • JSON
  • Groovy (Ans)
  • JavaScript

When considering the test and build stages, when should you download application dependencies?

  • Never
  • Once, at the beginning of the test stage (Ans)
  • Once, at the beginning of each stage
  • Whenever dependencies are required

How can you capture module and task output in Ansible playbooks?

  • Use the register action. (Ans)
  • Use the set_fact action.
  • Use the with_items action.
  • You can’t do this.

Which statement best describes integration testing?

  • Internally focused testing that may test across system boundaries (Ans)
  • Internally focused testing that never tests across class boundaries
  • Internally focused testing that never tests across system boundaries
  • Externally focused testing

When would you want to capture test reports?

  • On success or failure (Ans)
  • Never
  • Only on failure
  • Only on success

What is the most effective way to install the latest version of Ansible?

  • From the latest source
  • Using your operating system package manager
  • Using Python’s package manager called PIP (Ans)
  • Download from Ansible
Rajesh Kumar
Total Page Visits: 439 - Today Page Visits: 1