Volume 2 - Chapter 24: Understanding Ansible and Terraform Flashcards

1
Q

Describe what the term “Configuration Drift” means.

A

Configuration drift is an unintended effect where a networking device’s configuration slowing changes from the standard configuration over time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The following figure is an example of?

A

Centralized Configuration Management

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe the benefit of using configuration monitoring/enforcement

A

Even when company uses centralized configuration management configuration drift is still possible because technicians still have access to the network device CLI to make changes.

Configuration monitoring/enforcement can be used to detect if a device’s configuration drifts from the ideal configuration or unauthorized changes are made.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What term best describes the following?

The way that configuration changes are deployed to a networking device once they are managed in a configuration management system?

A

Configuration Provisioning.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe the function of templates and variables in regards to centralized configuration management

A

Some networking devices will share identical commands (for example, DNS servers or VLANs), but may need configurations that are unique to that device such as IP addresses and hostnames.

A standard template can be created and pushed to networking devices that includes the common configurations (DNS servers and VLANs), and variables that are unique to each device (IP addresses and hostnames)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

An engineer wants to create a Jinja2 template for a Cisco router that contains the following:
* a hostname
* 2 common DNS servers: 192.168.72.6 and 172.16.31.2
* a common domain name of mylab.local
* an IP address for interface Gi0/0/0

What would you expect to the output of this template to be?

A
hostname {{hostname}}
!
ip name-server 192.168.72.6 172.16.31.2
ip domain name mylab.local

interface GigabitEthernet0/0
  ip address {{address1}} {{mask1}}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

An engineer wants to create a YAML variables for the Jinja2 template created in the previous question:
* The hostname of the router is L2-RT1
* The IP address is 192.168.40.5/24

What would you expect to the output of this YAML file to be?

A

.
~~~
___
hostname: L2-RT1
address1: 192.168.40.5
mask1: 255.255.255.0
~~~

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Describe the function of a “Playbook” in regards to Ansible.

A

To provide actions that Ansible can take and logic for its decisions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Describe the function of an “Inventory” in regards to Ansible.

A

The inventory contains the list of devices that Ansible is managing, including the devices names, IP address, roles, etc….

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe the function of a “Template” in regards to Ansible.

A

Template represents a network device’s configuration including variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What type of language is used to write templates with Ansible?

A

Jinja2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Describe the function of “Variables” in regards to Ansible.

A

A file that contains the values for the variables in the template.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What type of language is used to write variables with Ansible?

A

YAML.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

True or False:

Ansible relies on an agent on the network device to read/write the device’s configuration.

A

False; Ansible uses an agentless architecture

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

If Ansible utilizes an agentless architecture, how does Ansible read/write configurations to/from a network device?

A

Using SSH or NETCONF

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the default model used by Ansible?

A

Ansible uses a push model by default, but also supports a pull model.

17
Q

True or False:

Terraform uses an Infrastructure as a Service (Iaas) model?.

A

False; Terraform is Infrastructure as Code (IaS).

18
Q

True or False:

Terraform is compatible with various cloud services providers.

A

True; Terraform can work with cloud services using the cloud provider’s APIs.

19
Q

What language is used by Terraform?

A

HashiCorp Configuration Language (HCL).

20
Q

Describe the difference in use case for Ansible versus Terraform.

A

Ansible is used for device configurations
Terraform is used for infrastructure provisioning

21
Q

What are the 3 stages to Terraform’s core workflow?

A
  1. Write: Define the resources that will be used
  2. Plan: The specific steps for creating, updating, or decoming the infrastructure
  3. Apply: Completeing the plan in a specific order of operations
22
Q

True or False:

Terraform uses an agentless model similar to Ansible.

A

False; Terraform uses a client/server model

23
Q

What type of push/pull model is used by Terraform?

A

Push