Posted on

Puppet Interview Questions


Puppet is the most popular software configuration tool that forms part of any interview starting from fresher, middle level to experienced IT professionals owing to migration to Devops culture. Here are useful interview questions that will help you with preparation
1) Which operator can convert an array into a comma separated list of arguments?
A.*(splat)
2) While writing a new class named mongodb::master which module path should contain definition class?
The class modules and codes reside in the manifests directory. mongodb/manifests/master.pp
3) For running mcollective commands which user will you make use of?
Make use of user peadmin
4) Who can issue mcollective commands as they control the puppet master?
Make use of user peadmin
5) In which directory of the module structure does the test function written to test functionality of the application reside?
It resides in the directory examples
6) Which is a control expression of an unless statement?
Make use of undef values
7) Mcollective makes use of ports to accept inbound traffic connection requests from puppet agents. Which port is being made use of for this purpose?
Any host used to invoke commands must be able to reach MCollective on this port. The PE Console accepts HTTPS traffic from end-users on this port 61613
8) You have monolithic installations. In which port does puppetdb accept incoming traffic?
In port 8081
9) What are the many different ways in which you can apply puppet manifests to the nodes?
Make use of one of the following methods :
a) Using Hiera
b) Puppet Enterprise Console
c) Include in manifests/site.pp
10) What kind of operands are accepted on either side of chained arrows?
a) Resource declarations
b) Resource references
c) Resource Collectors
11) You have to create complex expressions in resource collectors. Which of the operators can be used for this purpose?
We can make use of anyone of the following operators :
a) and
b) or
c) !=
12) As per puppet language style guide what should a comment explain?
It should explain why of the code
13) What is proper format of comments as per puppet guide?
As per puppet language style guide comments must be hash and not /* */
14) Which command is used to view all certificates waiting to be signed?
Make use of the command puppet cert list -a
15) Which status is invalid in puppet reporting in the Puppet::Transaction::Event?
The status ready is not a valid status
16) Can a resource have multiple namevars?
Yes. There can be
17) [master] environmentpath = $codedir/override_environments:$codedir/environments Is this a valid reference for the code directory?
Yes. This is a valid reference for the code directory
18) How will you make use of mcollective to trigger a puppet run on all your CentOS linux nodes?
Using command mco puppet runonce –wf operatingsystem=CentOS
19) How will you make use of fact option in puppet?
In puppet enterprise the fact option is to be used with with fact option –wf (or) -F
20) What is a fact in puppet enterprise?
It is a standard puppet facts available in puppet manifests
21) Which attributes do you need to make use of to make exec command Idempotent?
We need the following attributes:
a) unless
b) onlyif
c) creates
22) Which are valid statements of the producing and consuming service?
a) produces
b) consumes
c) export
23) Which operators take precedence in puppet?
The operator ! takes precedence
24) Which mcollective subcommand is the general purpose client that can invoke actions from any MCollective agent plugin ?
Make use of command rpc
25) Does variant datatype accept undef type as a parameter that will lead to resulting datatype match the undef?
Yes . It does
26) Give details on some catalog statements :-
a) realize
b) include
c) require
d) contain
27) Which key types are accepted by priority lookup in hiera 3.x?
a) top-level lookup keys
b) qualiqed keys
28) Which abstract datatype will not match undef default?
It is scalar datatype
29) Which abstract datatype will match undef default?
It includes datatypes like the ones below :
a) variant
b) data
c) any
d) vector
30) You have been asked to install puppetlabs-apache module from another module repository. Which command would you make use of for this purpose?
Using command puppet module install –module_repository http://dev-forge.example.com puppetlabs-apache
31) Which categories does appear in the report of Puppet::Util::Metric object?
a) resources
b) events
c) time
d) changes
32) Which component is not a component of the mcollective orchestration internals?
It is the rpc
33) Which component is a component of the mcollective orchestration internals?
a) mco
b) pe-actiemq
c) pe-mcollective
34) In $facts hash which variables are available?
It is the variable $clientversion
35) Which $facts hash variable has current version of puppet agent information and are available as top-score variable as well?
It is the variable $clientversion

Posted on

System Administration Using Puppet 205 Practice Tests


Puppet 205 System Administration Practice Tests will help you prepare for the hottest puppet product the open-source software configuration management tool that is rapidly gaining popularity in Devops space. Prepare using our practice exam questions and pass the exam in first attempt
System Administration Using Puppet 205 Practice Tests will help you prepare for the hottest puppet product the open-source software configuration management tool that is rapidly gaining popularity in Devops space
1) Which among the following comments is properly formatted as per puppet language style guide?
a) // Learnersreference.com
b) # Learnersreference.com
c) /* Learnersreference.com */
d) ; Learnersreference.com
Answer : b
Explanation : As per puppet language style guide comments must be hash and not /* */
2) As per puppet language style guide what should a comment explain?
a) why of the code
b) how of the code
c) not of the code
d) unrelated code
Answer : a
3) Which command is used to view all certificates waiting to be signed?
a) puppet cert list
b) puppet cert sign
c) puppet cert sign -a
d) puppet cert list -a
Answer : d
4) Which status is invalid in puppet reporting in the Puppet::Transaction::Event?
a) failure
b) success
c) ready
d) noop
Answer : c
5) Can a resource have multiple namevars?
a) Yes
b) No
Answer : a
6) [master] environmentpath = $codedir/override_environments:$codedir/environments Is this a valid reference for the code directory?
a) Yes
b) No
Answer : a
7) How will you make use of mcollective to trigger a puppet run on all your CentOS linux nodes?
a) mco puppet runonce CentOS
b) mco puppet runonce -f operatingsystem=CentOS
c) mco puppet runonce -f operatingsystem -v CentOS
d) mco puppet runonce –wf operatingsystem=CentOS
Answer : d
Explanation : In puppet enterprise the fact option is to be used with with fact option –wf (or) -F .
8) What is a fact in puppet enterprise?
a) standard puppet facts available in puppet manifests
b) standard puppet facts available in puppet actions
c) standard puppet facts available in puppet OS
d) standard puppet facts available in puppet agents
Answer : a
9) Which mcollective subcommand is the general purpose client that can invoke actions from any MCollective agent plugin ?
a) rpc
b) inventory
c) plugin
d) facts
Answer : a
10) Which attributes do you need to make use of to make exec command Idempotent? Choose all that apply
a) unless
b) onlyif
c) creates
d) print
Answer : a,b,c
11) Mcollective makes use of ports to accept inbound traffic connection requests from puppet agents. Which port is being made use of for this purpose?
a) 8080
b) 3306
c) 8142
d) 61613
Answer : d
Explanation : Any host used to invoke commands must be able to reach MCollective on this port. The PE Console accepts HTTPS traffic from end-users on this port
12) Which among the following statements are valid statements of the producing and consuming service?
a) report
b) produces
c) consumes
d) export
Answer : b,c,d
13) You have monolithic installations. In which port does puppetdb accept incoming traffic?
a) 8081
b) 8122
c) 61613
d) 8142
Answer : a
14) What are the many different ways in which you can apply puppet manifests to the nodes? Choose all that apply
a) Using pupptmani.conf
b) Using Hiera
c) Puppet Enterprise Console
d) Include in manifests/site.pp
e) leserver.conf
Answer : b,c,d
15) What kind of operands are accepted on either side of chained arrows?
a) Resource declarations
b) Resource references
c) Resource Collectors
d) Hash of resource references
Answer : a,b,c
16) You have to create complex expressions in resource collectors. Which of the operators can be used for this purpose? Choose all that apply
a) eq
b) and
c) or
d) !=
e) ||
Answer : b,c,d
17) Which among the following operators take precedence in puppet?
a) *
b) =
c) !
d) in
Answer : c
18) Which among the following operator has fourth precedence?
a) *
b) and
c) =
d) in
Answer : in
19) Which among the following operator has third precedence?
a) *
b) !
c) or
d) in
Answer : a
20) In $facts hash which among the following variables are available?
a) $serverversion
b) $settings
c) $clientversion
d) $environment
e) $servername
Answer : c
21) Which $facts hash variable has current version of puppet agent information and are available as top-score variable as well?
a) $serverversion
b) $settings
c) $clientversion
d) $clientenvironment
e) $servername
Answer : c
22) Which among the below abstract datatypes will not match undef default?
a) variant
b) data
c) any
d) vector
e) scalar
Answer : e
23) Does variant datatype accept undef type as a parameter that will lead to resulting datatype match the undef?
a) Yes
b) No
Answer : a
24) You have been asked to install puppetlabs-apache module from another module repository. Which command would you make use of for this purpose?
a) puppet module install puppetlabs:apache
b) puppet module install puppetlabs-apache
c) puppet module install ~/puppetlabs-apache-0.10.0.tar.gz
d) puppet module install –module_repository http://dev-forge.example.com puppetlabs-apache
Answer : d
25) Which among the following categories does appear in the report of Puppet::Util::Metric object?
a) resources
b) events
c) audit
d) time
e) changes
Answer : a,b,d,e
26) In which directory of the module structure does the test function written to test functionality of the application reside?
a) manifests
b) examples
c) functions
d) templates
Answer : b
27) Which among the following is not the control expression of an unless statement?
a) undef values
b) variables
c) scalar
d) expression vector
Answer : a
28) Which among the following are catalog statements?
a) realize
b) include
c) require
d) contain
e) notice
Answer : a,b,c,d
29) Which operator can convert an array into a comma separated list of arguments?
a) in.A
b) A.or
c) A.*(splat)
d) A.+(concatenation)
Answer : c
30) While writing a new class named mongodb::master which of the below module path should contain degnition class?
a) mongodb/manifests/slave.pp
b) mongodb/manifests/master/init.pp
c) mongodb/classes/manifests.pp
d) mongodb/manifests/master.pp
Answer : d
Explanation : The class modules and codes reside in the manifests directory

31)For running mcollective commands which user will you make use of?
a) admin
b) deploy
c) puppet
d) peadmin
Answer : d
32) Who can issue mcollective commands as they control the puppet master?
a) peadmin
b) puppet
c) admin
d) sudeo
Answer : a
33) Which among the following components is not a component of the mcollective orchestration internals?
a) rpc
b) mco
c) pe-actiemq
d) pe-mcollective
Answer : a
34) Which among the following key types are accepted by priority lookup in hiera 3.x?
a) top-level lookup keys
b) low-level lookup keys
c) qualiqed keys
d) merge keys
Answer : a,c