System configuration management is the process of keeping computer systems and software settings consistent and organized automatically.
Click to reveal answer
beginner
How does Jenkins help with system configuration management?
Jenkins automates tasks like installing software, updating settings, and running scripts to keep systems configured correctly.
Click to reveal answer
intermediate
What is a Jenkins pipeline in configuration management?
A Jenkins pipeline is a set of automated steps defined in code that manage system setup and changes in a repeatable way.
Click to reveal answer
intermediate
Why is version control important in system configuration management?
Version control tracks changes to configuration files so you can see history, fix mistakes, and keep systems consistent.
Click to reveal answer
beginner
Name a common tool Jenkins can integrate with for system configuration management.
Jenkins can integrate with tools like Ansible, Puppet, or Chef to manage system configurations automatically.
Click to reveal answer
What is the main goal of system configuration management?
ADelete old files regularly
BKeep systems consistent and automated
CManually update each computer
DOnly monitor system performance
✗ Incorrect
System configuration management aims to keep systems consistent and automate updates.
Which Jenkins feature helps automate system setup steps?
AUser Management
BDashboard
CPipeline
DBuild History
✗ Incorrect
Jenkins pipelines define automated steps for system setup and management.
Why use version control with configuration files?
ATo track changes and fix errors
BTo speed up the computer
CTo delete old configurations
DTo increase memory
✗ Incorrect
Version control tracks changes and helps fix mistakes in configuration files.
Which tool is NOT commonly used with Jenkins for configuration management?
APhotoshop
BAnsible
CPuppet
DChef
✗ Incorrect
Photoshop is a graphic design tool, not used for configuration management.
What does Jenkins automate in system configuration management?
AHardware repairs
BOnly email notifications
CManual typing of commands
DSoftware installation and updates
✗ Incorrect
Jenkins automates software installation, updates, and running scripts.
Explain how Jenkins pipelines support system configuration management.
Think about how Jenkins runs tasks automatically in order.
You got /4 concepts.
Describe why version control is important for managing system configurations.
Consider how you can undo or review changes safely.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of system configuration management in Jenkins?
easy
A. To write code for Jenkins plugins
B. To monitor Jenkins server performance
C. To automate setting up and maintaining computer systems
D. To create user accounts in Jenkins
Solution
Step 1: Understand system configuration management
It automates the setup and maintenance of computer systems to keep them consistent.
Step 2: Relate to Jenkins usage
Jenkins uses this to run tools like Ansible or Puppet to automate system setup.
Final Answer:
To automate setting up and maintaining computer systems -> Option C
Quick Check:
System configuration management = automation of system setup [OK]
Hint: Think automation of system setup and maintenance [OK]
Common Mistakes:
Confusing system config with Jenkins plugin development
Thinking it monitors Jenkins server only
Assuming it manages Jenkins user accounts
2. Which Jenkins pipeline step correctly runs an Ansible playbook named setup.yml?
easy
A. sh 'ansible-playbook setup.yml'
B. ansiblePlaybook 'setup.yml'
C. run ansible setup.yml
D. execute 'ansible-playbook setup.yml'
Solution
Step 1: Identify correct Jenkins pipeline syntax for shell commands
Jenkins uses sh step to run shell commands.
Step 2: Check Ansible command correctness
The correct command is ansible-playbook setup.yml.
Final Answer:
sh 'ansible-playbook setup.yml' -> Option A
Quick Check:
Use sh for shell commands in Jenkins [OK]
Hint: Use 'sh' step for shell commands in Jenkins pipeline [OK]
Common Mistakes:
Using non-existent Jenkins steps like ansiblePlaybook
Omitting the 'sh' wrapper for shell commands
Using incorrect command syntax
3. Given this Jenkins pipeline snippet:
pipeline {
agent any
stages {
stage('Config') {
steps {
sh 'ansible-playbook -i inventory setup.yml'
}
}
}
}
What happens when this pipeline runs?
medium
A. Jenkins runs the Ansible playbook setup.yml using the inventory file
B. Jenkins fails because sh cannot run Ansible
C. Jenkins skips the stage because no agent is specified
D. Jenkins runs the playbook but ignores the inventory file
Solution
Step 1: Understand the sh step in Jenkins pipeline
The sh step runs shell commands on the agent.
Step 2: Analyze the command ansible-playbook -i inventory setup.yml
This runs the Ansible playbook setup.yml using the specified inventory file.
Final Answer:
Jenkins runs the Ansible playbook setup.yml using the inventory file -> Option A
Quick Check:
sh runs shell commands, so Ansible runs as expected [OK]
Hint: Remember sh runs shell commands exactly [OK]
Common Mistakes:
Thinking Jenkins cannot run Ansible via shell
Assuming agent is missing and stage skips
Ignoring the inventory file in command
4. You wrote this Jenkins pipeline step:
sh 'ansible-playbook setup.yml -i inventory'
But the pipeline fails with "command not found" error. What is the likely cause?
medium
A. The playbook setup.yml has syntax errors
B. Ansible is not installed or not in PATH on the Jenkins agent
C. The sh step is incorrect syntax
D. The inventory file is missing
Solution
Step 1: Understand "command not found" error
This error means the shell cannot find the command ansible-playbook.
Step 2: Check possible causes
If Ansible is not installed or not in the PATH on the Jenkins agent, this error occurs.
Final Answer:
Ansible is not installed or not in PATH on the Jenkins agent -> Option B
Quick Check:
"command not found" means missing executable [OK]
Hint: "command not found" means missing program or PATH issue [OK]
Common Mistakes:
Assuming inventory file missing causes command not found
Thinking sh syntax is wrong
Blaming playbook syntax for command not found
5. You want Jenkins to ensure all your servers have the same configuration using Puppet. Which approach best fits system configuration management in Jenkins?
hard
A. Write Puppet manifests inside Jenkinsfile without running them
B. Manually log into each server and run Puppet commands
C. Use Jenkins only to build software, not for configuration
D. Create a Jenkins pipeline that runs Puppet agent commands on target servers
Solution
Step 1: Understand Jenkins role in system configuration
Jenkins automates running configuration tools like Puppet on servers.
Step 2: Identify best practice
Running Puppet agent commands via Jenkins pipeline automates and ensures consistency.
Final Answer:
Create a Jenkins pipeline that runs Puppet agent commands on target servers -> Option D
Quick Check:
Automation via Jenkins pipeline is best practice [OK]
Hint: Automate Puppet runs via Jenkins pipeline for consistency [OK]