True or false: If a template is syntactically valid, the service configuration it generates must also be valid.
5 Configuration Management and Reusable Automation Online Quiz Questions
Use this free practice quiz with 20 questions to review 5 Configuration Management and Reusable Automation, test your knowledge, and prepare for your next test or exam.
What version-control system is given as an example for storing configuration files, templates, and automation code?
In the Ansible example, the nginx service is configured with state: .
A team needs to generate similar configuration files for several environments while allowing values such as host names and ports to differ. Which approach best fits this need?
- A
A fixed sequence of commands that must be run manually for every host
- B
A reusable text pattern that generates similar configuration files using variable values
- C
A record of who changed a setting and when
- D
A collection of installed packages that cannot vary by environment
What property describes automation that can be applied repeatedly while leaving a system in the same desired state without unnecessary changes?
True or false: Every automation task or module is automatically idempotent, so testing before production use is unnecessary.
- A
True
- B
False
The term for a system's actual settings diverging from its documented desired state is .
A team needs to manage installed packages and services on servers, and also describe and provision infrastructure. Which tool-role pairing best matches the material?
- A
Use Terraform for system configuration and Ansible for infrastructure provisioning in every case
- B
Use Puppet only to define infrastructure and Terraform only to manage installed packages
- C
Use Ansible or Puppet for system configuration; Terraform commonly describes and provisions infrastructure
- D
Use Git as the tool that applies packages and starts services
A team wants to compare configuration revisions and restore an earlier version if needed. Which benefit of version control directly supports these goals?
- A
It automatically prevents every unsafe configuration change from being deployed
- B
It records changes over time so revisions can be compared and earlier versions restored
- C
It replaces the need to test configuration changes
- D
It guarantees that every manual system change is captured in the repository
A configuration change requires an access credential. Which practice best protects that sensitive value?
- A
Commit credentials alongside the configuration so every team member can use them
- B
Store credentials in generated configuration files without access restrictions
- C
Keep credentials out of ordinary repositories and use an appropriate secrets-management mechanism with restricted access
- D
Place credentials in a public repository but rotate them after each deployment
Select all practices that help make reusable roles or modules predictable for their consumers.
- A
A reusable component should have clear inputs and outputs.
- B
All consumers should be forced to use identical environment-specific values.
- C
Documentation helps consumers understand the component's interface.
- D
Versioning can help prevent a change from unexpectedly affecting every consumer.
- E
A shared component should have no documented interface.
An automation file states that a web service should be running, leaving the tool to determine the actions needed to reach that condition. What approach does this describe?
- A
An imperative script, because it states the target service condition
- B
A declarative configuration, because it states the desired result rather than prescribing every command
- C
A version-control record, because it lists commands in execution order
- D
A template, because it necessarily installs and starts the service
Select all actions that belong in the material's practical configuration-change workflow.
- A
Edit configuration on a branch and explain the intent of the change.
- B
Review the diff for unintended changes or unsafe values.
- C
Run syntax checks and tests, and render or plan changes where supported.
- D
Merge an approved change and deploy it in a controlled way.
- E
Skip checks and tests to avoid delaying deployment.
- F
Check results after deployment and update configuration if observed state differs from intended state.
An emergency manual change is made to a system, but the configuration repository is not updated. What should the team do afterward, and why?
Name one tool used to manage system configuration, rather than primarily to describe and provision infrastructure.
A team wants its automation to express that a web service must be running without prescribing each command to achieve that result. Which approach best fits this goal?
- A
Declare that the web service should be running and let the tool determine the needed actions.
- B
Write a fixed sequence of commands to install, enable, and start the service.
- C
Record the service settings only after an administrator changes them manually.
- D
Create a separate hand-edited configuration file for every host.
If a package is already installed, an idempotent task that declares it should be present reports no change.
- A
True
- B
False
A team needs similar configuration files for several environments, with values such as the port and site name varying by environment. Which approach best supports this reuse?
- A
Use one reusable text pattern and supply host- or environment-specific variable values.
- B
Keep a separate manually edited copy for every host, with no shared pattern.
- C
Store only the final generated files and discard the pattern used to create them.
- D
Put all host-specific values directly into a fixed sequence of shell commands.
What is the term for a system's actual settings diverging from its documented desired state, such as after an unreviewed manual edit?
An Ansible template contains expressions that are filled with variable values when a configuration file is generated. Which language does Ansible use for these template expressions?
- A
Jinja2
- B
Terraform
- C
Git
- D
Puppet