nerdexam
Cisco

300-910 · Question #103

Drag and Drop Question A DevOps engineer is constructing an Ansible playbook to deploy a containerized application via Docker. This playbook must conform to these requirements: Run against the product

Sign in or unlock 300-910 to reveal the answer and full explanation for question #103. The question stem and answer options stay visible for context.

Application Deployment and Operations

Question

Drag and Drop Question A DevOps engineer is constructing an Ansible playbook to deploy a containerized application via Docker. This playbook must conform to these requirements:
  • Run against the production_hosts group of hosts as defined in the Ansible inventory file.
  • Must pull the latest my application Docker image from the my_repository registry on the Docker Hub registry.
  • Must give the container a name of my_container.
Drag and drop the code snippets from the bottom onto the boxes in the code to construct an Ansible playbook to fulfill the requirements. Not all options are used.
---
- name: Deploy container
 hosts: <BLANK_1>
 tasks:
 - name: Update container with latest if necessary
 <BLANK_2>:
 name: <BLANK_3>
 image: <BLANK_4>
 pull: true
 state: started
Snippets to drag:
  • community.general.lxc_container
  • my_repository/my_application:latest
  • community.general.docker_container
  • my_repository/my_application[latest]
  • hosts: production_hosts
  • my_container

Unlock 300-910 to see the answer

You've previewed enough free 300-910 questions. Unlock 300-910 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#Ansible#Docker#Container Deployment#Infrastructure as Code
Full 300-910 Practice