Volume 2 - Chapter 24: Understanding Ansible and Terraform Flashcards
Describe what the term “Configuration Drift” means.
Configuration drift is an unintended effect where a networking device’s configuration slowing changes from the standard configuration over time.
The following figure is an example of?
Centralized Configuration Management
Describe the benefit of using configuration monitoring/enforcement
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.
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?
Configuration Provisioning.
Describe the function of templates and variables in regards to centralized configuration management
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)
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?
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}}
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?
.
~~~
___
hostname: L2-RT1
address1: 192.168.40.5
mask1: 255.255.255.0
~~~
Describe the function of a “Playbook” in regards to Ansible.
To provide actions that Ansible can take and logic for its decisions
Describe the function of an “Inventory” in regards to Ansible.
The inventory contains the list of devices that Ansible is managing, including the devices names, IP address, roles, etc….
Describe the function of a “Template” in regards to Ansible.
Template represents a network device’s configuration including variables
What type of language is used to write templates with Ansible?
Jinja2
Describe the function of “Variables” in regards to Ansible.
A file that contains the values for the variables in the template.
What type of language is used to write variables with Ansible?
YAML.
True or False:
Ansible relies on an agent on the network device to read/write the device’s configuration.
False; Ansible uses an agentless architecture
If Ansible utilizes an agentless architecture, how does Ansible read/write configurations to/from a network device?
Using SSH or NETCONF
What is the default model used by Ansible?
Ansible uses a push model by default, but also supports a pull model.
True or False:
Terraform uses an Infrastructure as a Service (Iaas) model?.
False; Terraform is Infrastructure as Code (IaS).
True or False:
Terraform is compatible with various cloud services providers.
True; Terraform can work with cloud services using the cloud provider’s APIs.
What language is used by Terraform?
HashiCorp Configuration Language (HCL).
Describe the difference in use case for Ansible versus Terraform.
Ansible is used for device configurations
Terraform is used for infrastructure provisioning
What are the 3 stages to Terraform’s core workflow?
- Write: Define the resources that will be used
- Plan: The specific steps for creating, updating, or decoming the infrastructure
- Apply: Completeing the plan in a specific order of operations
True or False:
Terraform uses an agentless model similar to Ansible.
False; Terraform uses a client/server model
What type of push/pull model is used by Terraform?
Push