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?
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 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