Spread the love

1. What is IaC (Infrastructure as Code)?

  • Writing a program from the outside in
  • Programs for industrial use
  • Hardware-based programming with FPGAs
  • Using a version control system to deploy and manage node configurations

2. What is the principle called when you think of networked machines as interchangeable resources instead of individual machines?

  • “Flexible deployment”
  • The “Borg” principle
  • Treating computers like “cattle instead of pets”
  • The principle of “group operation”

3. What benefits can we gain by using automation to manage our configuration? (Check all that apply)

  • Consistency
  • Simplicity
  • Reliability
  • Scalability

4. Puppet is a commonly used configuration management system. Which of the following applications are also used for configuration management?

  • Valgrind
  • Chef
  • Ansible
  • CFEngine

5. A network administrator is accustomed to manually configuring the 5 nodes on the network he manages. However, the company he works for is quickly growing, and there are plans to expand the network to 200 nodes. What is the most reasonable course of action for the network administrator?

  • Prepare to manually configure 200 nodes
  • Hire more network techs
  • Ask for a reduction in planned nodes to simplify configuration
  • Prepare scripts or download software for automated configuration

6. A Puppet agent inspects /etc/conf.d, determines the OS to be Gentoo Linux, then activates the Portage package manager. What is the provider in this scenario?

  • /etc/conf.d
  • Portage
  • Gentoo Linux
  • The Puppet agent

7. Which of the following examples show proper Puppet syntax?

class AutoConfig {

package { ‘Executable’:

ensure => latest,

}

file { ‘executable.cfg’:

source => ‘puppet:///modules/executable/Autoconfig/executable.cfg’

replace => true,

}

service { ‘executable.exe’:

enable => true,

ensure => running,

}

}

class AutoConfig :

package ”Executable’:

ensure => latest,

file ‘executable.cfg’:

source => ‘puppet:///modules/executable/Autoconfig/executable.cfg’

replace => true,

service ‘executable.exe’:

enable => true,

ensure => running,

class AutoConfig {

package { ‘Executable’:

ensure == latest,

}

file { ‘executable.cfg’:

source == ‘puppet:///modules/executable/Autoconfig/executable.cfg’

replace == yes,

}

service { ‘executable.exe’:

enable == yes,

ensure == true,

}

}

class AutoConfig {

package { ‘Executable’:

assure=> latest,

}

file { ‘executable.cfg’:

origin=> ‘puppet:///modules/executable/Autoconfig/executable.cfg’

substitute=> true,

}

program{ ‘executable.exe’:

activate => true,

assure => running,

}

}

  • class AutoConfig {

package { ‘Executable’:

ensure => latest,

}

file { ‘executable.cfg’:

source => ‘puppet:///modules/executable/Autoconfig/executable.cfg’

replace => true,

}

service { ‘executable.exe’:

enable => true,

ensure => running,

}

}

8. What is the benefit of grouping resources into classes when using Puppet?

  • Providers can be specified
  • Configuration management is simplified
  • The title is changeable
  • Packages are not required

9. What defines which provider will be used for a particular resource?

  • Puppet assigns providers based on the resource type and data collected from the system.
  • A menu allows you to choose providers on a case-by-case basis.
  • The user is required to define providers in a config file.
  • Puppet uses an internet database to decide which provider to use.

10. In Puppet’s file resource type, which attribute overwrites content that already exists?

  • Purge
  • Overwrite
  • Replace
  • Save

11. How is a declarative language different from a procedural language?

  • A declarative language defines the goal; a procedural language defines the steps to achieve a goal.
  • Declarative languages are object-based; procedural languages aren’t.
  • Declarative languages aren’t stateless; procedural languages are stateless.
  • A declarative language defines each step required to reach the goal state.

12. Puppet facts are stored in hashes. If we wanted to use a conditional statement to perform a specific action based on a fact value, what symbol must precede the facts variable for the Puppet DSL to recognize it?

  • @
  • #
  • $
  • &

13. What does it mean that Puppet is stateless?

  • Puppet retains information between uses.
  • An action can be performed repeatedly without changing the system after the first run.
  • There is no state being kept between runs of the agent.
  • Actions are taken only when they are necessary to achieve a goal.

14. What does the “test and repair” paradigm mean in practice?

  • There is no state being kept between runs of the agent.
  • We should plan to repeatedly fix issues.
  • We need to test before and after implementing a fix.
  • We should only take actions when testing determines they need to be done to reach the requested state

15. Where, in Puppet syntax, are the attributes of a resource found?

  • Inside the curly braces after the resource type
  • In brackets after the if statement
  • After ensure =>
  • After the dollar sign ($)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *