{"id":8784,"date":"2020-01-15T08:04:19","date_gmt":"2020-01-15T08:04:19","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=8784"},"modified":"2021-11-13T11:04:55","modified_gmt":"2021-11-13T11:04:55","slug":"puppet-interview-questions-and-answer-part-1","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/puppet-interview-questions-and-answer-part-1\/","title":{"rendered":"Puppet Interview Questions and Answer Part \u2013 1"},"content":{"rendered":"\n<p><strong>Where does the Puppet agent look for the Puppet Master hostname?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>In \/etc\/puppet\/puppet.conf under the [agent] section (Ans)<\/strong><\/li><li>In \/etc\/puppet.conf under the [agent] section<\/li><li>In \/etc\/puppet\/puppet.conf under the [master] section<\/li><li>In \/etc\/puppet.conf under the [master] section<\/li><\/ul>\n\n\n\n<p><strong>What is one way to run the Puppet agent manually?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Execute c:\\programdata\\puppetlabs\\puppet\\bin\\puppet_run.exe<\/li><li>Execute c:\\program files\\puppet labs\\bin\\puppet.bat &#8211;run-now<\/li><li>Execute c:\\programdata\\puppetlabs\\puppet\\bin\\puppet_run.bat<\/li><li><strong>Execute c:\\program files\\puppet labs\\bin\\puppet_interactive.bat (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>How is Puppet different than Chef and CFEngine?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Chef and CFengine are not open source<\/li><li>Puppet&#8217;s language is procedural while Chef and CFEngine use declarative languages<\/li><li><strong>Puppet&#8217;s language is simpler and easier to learn (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>Where must directory environments be located?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>There is no particular location where they must be located (Ans)<\/strong><\/li><li>\/etc\/puppet\/environments<\/li><li>\/etc\/puppet<\/li><li>\/etc\/puppet\/manifests\/environments<\/li><\/ul>\n\n\n\n<p><strong>What is one of the purposes of modules?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Provide a way to backup Puppet configurations<\/li><li>Eliminate the need to ever do anything manually<\/li><li><strong>Extend Puppet&#8217;s native functionality (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>What directory should module-specific templates go in?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Under the module&#8217;s root path<\/li><li>\/etc\/puppet\/templates<\/li><li><strong>The templates subdirectory under the module&#8217;s root path (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>Hiera data can be stored in YAML files. What are these files called?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Data fields<\/li><li>Data accessor models<\/li><li><strong>Data sources (Ans)<\/strong><\/li><li>Hierarchial manifests<\/li><\/ul>\n\n\n\n<p><strong>What does the beginning of a class definition for the &#8220;linux&#8221; class look like?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>class linux: {<\/li><li><strong>class linux { (Ans)<\/strong><\/li><li>{ class &#8216;linux&#8217;:<\/li><\/ul>\n\n\n\n<p><strong>What is a resource type?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The type of Puppet server<\/li><li>The type of node to be managed, such as Windows or Linux<\/li><li><strong>The type of resource to be managed, such as package, service, or file (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>The frequency of configuration runs is controlled by the\u2026<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>crontab<\/li><li><strong>Run interval (Ans)<\/strong><\/li><li>Execution interval<\/li><li>Enforcement interval<\/li><li>The Windows service subsystem<\/li><\/ul>\n\n\n\n<p><strong>What web server ships with the Puppet Master?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>nginx<\/li><li>NetScaler<\/li><li><strong>WEBrick (Ans)<\/strong><\/li><li>Apache HTTP server<\/li><\/ul>\n\n\n\n<p><strong>What happens if the title in a package resource declaration does not match the Windows DisplayName?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Puppet will uninstall and reinstall the package<\/li><li><strong>Puppet will think the package isn&#8217;t installed &amp; will try to install it on every configuration run (Ans)<\/strong><\/li><li>Windows will blue-screen<\/li><li>Puppet will never install the package<\/li><\/ul>\n\n\n\n<p><strong>Which of the following is the beginning of a valid file resource declaration?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>file { &#8216;\/info.txt&#8217;: (Ans)<\/strong><\/li><li>file { &#8216;\/info.txt&#8217; (<\/li><li>file &#8220;\/info.txt&#8221;: {<\/li><li>file &#8216;\/info.txt&#8217; {<\/li><\/ul>\n\n\n\n<p><strong>What command run on a CentOS Puppet Master reloads the Hiera configuration?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>sudo service puppetmaster restart<\/li><li>sudo service apache restart<\/li><li><strong>sudo service httpd restart (Ans)<\/strong><\/li><li>sudo service httpd restart<\/li><\/ul>\n\n\n\n<p><strong>Why aren&#8217;t group policies always sufficient for Windows configuration management?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Group policies require the use of PowerShell scripts<\/li><li>Group policies do not allow managing files, packages, or services<\/li><li><strong>Group policies require an Active Directory infrastructure to be scalable (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>What is the command for setting SELinux to permissive mode?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>sudo getenforce &#8211;mode=permissive<\/li><li><strong>sudo setenforce permissive (Ans)<\/strong><\/li><li>sudo setenforce disabled<\/li><\/ul>\n\n\n\n<p><strong>What does a selector do?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Takes a set of possible values and assigns one of those values to a variable based on a condition (Ans)<\/strong><\/li><li>Selects which package, file, or service declaration should be executed first<\/li><li>Installs a package based on the version of operating system the Puppet agent is running on<\/li><\/ul>\n\n\n\n<p><strong>What is a Git repository?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>A copy of files and directories that cannot be stored locally<\/li><li>Where you download Git from<\/li><li><strong>Where Git maintains and tracks changes to files and directories (Ans)<\/strong><\/li><\/ul>\n\n\n\n<p><strong>How is a role implemented?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>By creating a subclass inside the profiles module named profiles::profilename<\/li><li><strong>By creating a subclass inside the roles module named roles::rolename (Ans)<\/strong><\/li><li>By creating a subclass inside the roles module named profiles::profilename<\/li><\/ul>\n\n\n\n<p><strong>What does it mean for the Puppet Master to classify a node?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Locate the node definition in the manifest and determine what configuration should be applied (Ans)<\/strong><\/li><li>To generate a catalog based on the node&#8217;s manifest<\/li><li>To instantiate a class based on the node&#8217;s operating system <\/li><\/ul>\n\n\n<div class=\"epyt-gallery\" data-currpage=\"1\" id=\"epyt_gallery_42779\"><iframe loading=\"lazy\"  id=\"_ytid_49163\"  width=\"760\" height=\"427\"  data-origwidth=\"760\" data-origheight=\"427\" src=\"https:\/\/www.youtube.com\/embed\/?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  data-epytgalleryid=\"epyt_gallery_42779\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe><div class=\"epyt-gallery-list\"><div>Sorry, there was a YouTube error.<\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Where does the Puppet agent look for the Puppet Master hostname? In \/etc\/puppet\/puppet.conf under the [agent] section (Ans) In \/etc\/puppet.conf under the [agent] section In \/etc\/puppet\/puppet.conf under the [master] section&#8230; <\/p>\n","protected":false},"author":1,"featured_media":8824,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[89],"tags":[159,5679,4958],"class_list":["post-8784","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-puppet","tag-puppet","tag-puppet-master-hostname","tag-selinux"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8784","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=8784"}],"version-history":[{"count":2,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8784\/revisions"}],"predecessor-version":[{"id":25117,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/8784\/revisions\/25117"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media\/8824"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=8784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=8784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=8784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}