Basics Flashcards
if it hasn’t already been created, you can create a simple puppet.conf file using the following command:
puppetmasterd –genconfig > puppet.conf
Puppet’s configuration will be located under the ? directory. Puppet’s principal configuration file is called puppet.conf and is stored:
/etc/puppet directory /etc/puppet/puppet.conf.
In the puppet.conf what are the 3 sections
[agent] section configures the Puppet agent,[master] section configures the Puppet master binary. There is also a global configuration section called [main]. All components of Puppet will set options specified in the [main] section.
In puppet.conf specifies the name of the Puppet master. How would you add the certname value to the [master] section
[master] certname=puppet.example.com
What file tells Puppet where and what configuration to load for our clients?.
/etc/puppet/manifests/site.pp
Puppet will not start without the ? file being present.
/etc/puppet/manifests/site.pp file
The Puppet master runs on TCP port ?
TCP port 8140.
The Puppet master can be started via an init script on most Linux distributions.
On Red Hat: # service puppetmaster start On Debian or Ubuntu:# invoke-rc.d puppetmaster start
What does a resource look like?
type { title: attribute => value, }
what is the RAL?
Resource Abstraction Layer
what does the Resource Abstraction Layer do?
The RAL knows how different platforms and OSs manage certain types of resources.
What tool is used to return information about agents
Facter, in a system inventory tool.
In what format are ‘facts’ from Facter return
Key => Value pairs i.e operatingsystem => Ubuntu
What 4 main tasks does the Transactional Layer do?
- interpret and compile your configuration2. Communicate the compiled config to the agent3. Apple the config on the agent4. Report the results of that application to the master.
What does idempotent mean?
Multiple applications of the same operation will yield the same results. Puppet configuration can be safely run multiple times.
What is noop?
no operation mode. The ability to test the execution of your changes without making any changes
Name configuration Items that Puppet can manage
File, Services, Packages, Users, Groups, Cron Jobs, SSH Keys, Nagios configurations.
where is the puppet configuration file located on most platforms?
/etc/puppet/puppet.conf
If puppet.conf doesn’t exist, how can it be created?
$ sudo puppet master –genconfig»_space; /etc/puppet/puppet.conf
what section of the puppet.conf file do we specify the Puppet master?
[master] certname=puppet.example.com
What file tell Puppet where and what configuration to load for our client.
/etc/puppet/manifests/site.pp
The main configuration file for puppet master, puppet agent, and puppet apply is —–
/etc/puppet/puppet.conf
What is the default time for a puppet agent to wake and check-in with the puppet master (or puppetmasterd)
30 minutes (configurable)
puppet apply is used when?
When running Puppet locally (for instance, to test manifests, or in a non-networked case, puppet apply is run instead of puppet agent. It then uses local files, and does not try to contact the central server.
puppet cert (or puppetca) is used for what?
The puppet cert command is used to sign, list and examine certificates used by Puppet to secure the connection between the Puppet master and agents
The most common usage of ‘puppet cert’ is to sign the certificates of Puppet agents awaiting authorisation. What is the command
puppet cert –list
list all signed and unsigned certificates
puppet cert –all and –list
What generates documentation about Puppet and your manifests?
puppet doc (or puppetdoc)
What does ‘puppet resource’ do?
Puppet resource (also known as ralsh, for “Resource Abstraction Layer SHell”) uses Puppetʼs resource abstraction layer to interactively view and manipulate your local system
How do you list information about a user resource?
puppet resource User “username”
User puppet resource to add a user called “bob” in the “admin” group
puppet resource User “bob” ensure=present groups=admin
how do you remover the resource “bob”
puppet resource User “bob” ensure=absent
what command generates an inspection report and sends it to the puppet master
puppet inspect
Puppet agent nodes use a library (and associated front-end tool) called ______ to provide information about the hardware and OS
Facter
tell the system to operate in no-op mode
–noop’