6.6 Configuration Management Mechanisms Flashcards

Recognize the capabilities of configuration management mechanisms, such as Ansible and Terraform. (30 cards)

1
Q

What are the main components of configuration management tools?

A
  • Hosts
  • Tasks
  • Templates
  • Variables
  • Inventory

Hosts: Systems or devices managed by the configuration tool.

Tasks: Actions or commands executed on the hosts.

Templates: Dynamic files used to generate configuration settings using variables.

Variables: Parameters that provide flexibility to configurations by defining dynamic values.

Inventory: A list of hosts or systems managed by the configuration tool.

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

List three core functions of a configuration management tool.

A
  1. Implement configuration changes.
  2. Validate changes before deployment.
  3. Revert to the original configuration if a change is unsuccessful.

These functions help ensure that configuration changes are deployed correctly and can be easily reversed if necessary.

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

Which tool uses a push model to configure network devices?

A

Ansible

Ansible is widely adopted for automating network device configurations due to its simplicity, agentless operation, and powerful automation features.

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

What are the three types of text files utilized by Ansible?

A
  1. Playbooks
  2. Inventory
  3. Configuration

Playbooks: YAML files that define tasks to be executed on managed systems.

Inventory: Files that list the hosts or systems managed by Ansible.

Configuration: Files that define various settings and defaults for Ansible’s operation.

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

List three characteristics that are true regarding Ansible.

A
  1. Uses SSH for device management
  2. Agentless operation
  3. Uses YAML for playbooks

Uses SSH for device management: Ansible manages devices over SSH, eliminating the need for agent installation on target systems.

Agentless operation: Ansible operates without requiring agents on managed nodes, simplifying deployment and reducing overhead.

Uses YAML for playbooks: Ansible playbooks are written in YAML, providing a human-readable format for defining automation tasks.

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

What file term does Ansible use to list actions?

A

Playbook

Playbooks define the tasks to be executed and provide the core functionality in Ansible, detailing the configurations to be applied.

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

What is configuration drift?

A

Changes in a device’s configuration over time.

Configuration drift occurs when one device’s settings deviate from others of the same role, causing inconsistencies in the network.

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

What does configuration monitoring do?

A

Detects deviations from desired configurations and takes corrective actions.

Configuration monitoring helps maintain consistency and ensures compliance with predefined configurations across devices.

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

True or False:

Ansible uses a pull model for configuration management.

A

False

Ansible operates on a push model, pushing configurations to devices from a central location.

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

Fill in the blank:

Configuration monitoring is also called ______ ______.

A

configuration enforcement

This term emphasizes the enforcement of configuration compliance, ensuring devices adhere to the predefined configurations.

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

What is configuration provisioning?

A

The process of applying configuration changes after modifications.

This process ensures that updates to system configurations are implemented and applied to the infrastructure after changes are made in the configuration management system.

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

What is the purpose of configuration templates in management tools?

A

To separate common and unique configuration parts.

Templates divide configurations into shared elements for all devices in a role and unique elements specific to individual devices, making management more efficient.

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

What are the benefits of using templates for device configurations?

A
  • Standardizes configurations to avoid unique setups
  • Simplifies deployment of new devices with existing roles
  • Eases troubleshooting by using a standard template

Templates help maintain consistency, simplify the deployment of new devices by reusing existing configurations, and assist in troubleshooting by using a standard setup for all devices in a role.

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

What language does Ansible use for templates?

A

Jinja2

Jinja2 is a popular templating engine that allows dynamic content generation in Ansible configurations using variables.

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

True or False:

Ansible can be used to configure cloud infrastructure.

A

True

Ansible can automate the provisioning and configuration of cloud infrastructure, including AWS, Azure, and Google Cloud, by using appropriate modules.

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

What is the architecture model used by Ansible?

A

Push model

Ansible’s architecture involves pushing configurations from a central server to devices without needing agents on the target systems.

17
Q

What is the purpose of the ansible-playbook command?

A

To execute Ansible playbooks.

The ansible-playbook command runs the tasks defined in a playbook, applying configuration changes to managed systems.

18
Q

What file format does Ansible use for defining variables?

A

YAML

YAML is used in Ansible for its simplicity and readability, allowing for easy definition and management of variables.

19
Q

List the core Ansible commands.

A
  • ansible –version
  • ansible-playbook
  • ansible-inventory
  • ansible-galaxy

ansible –version: Displays Ansible version.

ansible-playbook: Runs Ansible playbooks.

ansible-inventory: Manages Ansible inventory.

ansible-galaxy: Manages Ansible roles from Galaxy.

20
Q

What are the basic components of a Terraform configuration file?

A
  • Providers
  • Resources
  • Variables
  • Outputs

Providers: Define the infrastructure services (e.g., AWS, Azure) to be used by Terraform.

Resources: Specify the infrastructure components (e.g., servers, databases) to be created or managed.

Variables: Allow input values to customize configurations, making them more flexible.

Outputs: Define values to be displayed after deployment, such as IP addresses or URLs.

21
Q

What is the component necessary to integrate Terraform with Google Cloud?

A

Providers

In Terraform, Providers serve as plugins that facilitate integration with various platforms, including Google Cloud. They enable Terraform to manage resources across different environments.

22
Q

List the three essential steps in a Terraform workflow.

A
  1. Write
  2. Plan
  3. Apply

Write: Define infrastructure resources.

Plan: Preview proposed changes.

Apply: Execute changes to create or modify resources.

23
Q

True or False:

Terraform supports both imperative and declarative styles.

A

False

Terraform follows a declarative approach where you specify the desired outcome and Terraform manages the necessary steps to reach it.

24
Q

Why is Terraform considered declarative?

A

It defines the desired end state.

Terraform focuses on describing what the infrastructure should look like, leaving Terraform to figure out the necessary steps to achieve that state.

25
What are the **types of data sources** in Terraform?
* Cloud Provider * Configuration Management * Custom API ## Footnote **Cloud Provider**: Data sources that retrieve information from cloud services (e.g., AWS, Azure) **Configuration Management**: Data sources that fetch data from configuration management systems (e.g., Consul). **Custom API**: Data sources that obtain information from custom APIs or external systems.
26
# True or False: Terraform **automatically applies changes** without approval.
False ## Footnote Terraform *generates a plan* that must be reviewed and approved before any changes are made to the infrastructure.
27
What is a **Terraform execution plan**?
A **preview of the changes** Terraform will apply. ## Footnote The execution plan shows what *actions Terraform will take (create, update, or delete resources)* to bring the infrastructure in line with the desired state.
28
List the **steps involved** in the Terraform initialization process.
1. Install plugins. 2. Initialize configuration. 3. Download provider plugins. ## Footnote Running **terraform init** initializes the working directory, installs required plugins, and prepares the environment to run Terraform commands.
29
List the core **Terraform CLI commands**.
* terraform init * terraform plan * terraform apply * terraform destroy ## Footnote **terraform init**: Initializes a Terraform working directory. **terraform plan**: Previews infrastructure changes. **terraform apply**: Applies changes to infrastructure. **terraform destroy**: Destroys the infrastructure.
30
Why would you use **version control** with Ansible and Terraform?
To **track changes** and **ensure consistency**. ## Footnote Version control allows you to *manage infrastructure code*, track who made changes, roll back to previous versions, and collaborate with teams effectively.