Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Installation and configuration of puppet


    I am new to using Puppet, and recently installed puppetmaster and puppet(client) on my Ubuntu server. (both on the same host). I installed using apt-get install.

    Now, when I want to remove those packages, I used apt-get --purge remove puppetmaster puppet to remove the package and its configuration files as well.

    However, after I do this, the /etc/puppet directory still exists, and even the puppet.conf file also exists.

    Is this normal, or is there something I did not do right that the directory still exists??

    Also, is it possible to install both puppet master and client in the same host? In the puppet.conf, under agent and master, I use the certname as [localhost] and
    [localhost] respectively? Or if there is a better solution to configuring master and client on the same server, please guide me.

    Thanks in advance,
    Last edited by anaigini45; 10-21-2012 at 02:43 PM.

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Package managers group files in classes.
    Regular files, man pages, configuration files, etc.
    The reason for this is, that you do want to update binaries but not necessarily configfiles.
    And even if you remove a package, you probably want to keep your configfiles to not loose the work on them.

    You specified --purge, so yes: Even configfiles are removed.
    The reason why the directory remains is probably because there are still files in it.
    Or more specific: There are files in it, that are not covered by the package.
    Hence the package manager does not delete the dir as a protective measure.

    Yes, it is possible to manage the puppetmaster itself, ie: run the agent on it.
    This is actually a good idea.

    But you shouldnt use localhost to refer to it. This is ambiguous.
    What I do:
    - All machines have a hostname that consists of a identifier of the datacenter they are in and a running number. Lets say:
    - Once a machine is assigned to a specific purpose, there will be a CNAME for it: puppetmaster CNAME dublin123
    - This allows some independence from the host
    - So you would use the dublin<number> hostnames in site.pp
    - As for certs: the puppetmaster would be listed twice. Once as and then as All other nodes only have dublin<number>
    - In the [agent] section of puppet.conf, the server is then
    You must always face the curtain with a bow.

  3. #3
    Thank you very much for the answer. Just for some confirmation, I did a hostname -A to get the fqdns for my hostname, and these are what I got :

    aigini@aigini-Studio-1555:/etc/init.d$ hostname -A

    I have now signed the certificate :

    aigini@aigini-Studio-1555:/etc/puppet$ sudo puppetca --list --all
    + "" (3E:2F:4D:6D:CE:F1:38:37:E4:03:34:3F:56:90:12:B5)
    + "" (33:603:50:53:CC:9F:83:369:A4:CA:04:FB:BC:C7) (alt names: "", "", "DNSuppet", "")

    So my client is now, and my server(puppetmaster) is

    This is how my /etc/puppet/puppet.conf looks :


    # Make sure all log messages are sent to the right directory
    # This directory must be writable by the puppet user



    I then created /etc/puppet/manifests/site.pp, and this is how it looks :
    class test_class {
    file { "/tmp/testfile":
    ensure => present,
    mode => 644,
    owner => root,
    group => root

    # tell puppet on which client to run the class
    node 221-lca.dhcp.lcalink {
    include test_class


    Then I run puppet in verbose mode once :

    puppetd -v -o

    After these steps, by right the /tmp/testfile should be created. However, I can't see this file after I have performed the steps above. So what could be the reason? Please help.
    Last edited by anaigini45; 10-22-2012 at 03:36 AM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts