Matthew Hyclak | 1 May 2009 04:23
Picon

[Puppet Users] Re: Automatically update host


On Thu, Apr 30, 2009 at 1:59 PM, haribole <rdu.hari <at> gmail.com> wrote:
>
> Hello Group
>
> I am trying to setup puppet so that when a new client connects to the
> server, the puppetd from the client can update a resource on the
> puppetmasted server with its IP address, fqdn and alias, so that this
> info can be distributed to all the known clients of the network.
>
> From what I understand the puppet master server would have these
> details from facter, and wonder if the above can be scripted.
>
> Thanks for any inputs.
>

That information is probably in the /var/lib/puppet/yaml/node/$fqdn.yaml files

Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users <at> googlegroups.com
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Matt Marshall | 1 May 2009 16:29
Favicon

[Puppet Users] Re: Question regarding directories

> -----Original Message-----
> From: Peter Meier [mailto:peter.meier <at> immerda.ch]
> Sent: Friday, May 01, 2009 5:17 AM
> To: Matt Marshall
> Cc: puppet-users <at> googlegroups.com
> Subject: Re: [Puppet Users] Question regarding directories
> 
> Hi
> 
> > I am trying to set puppet up to manage a directory of files, in this
> > particular case for bacula.  Is there any way to get puppet to copy
> all
> > of the files in the directory to the destination machine? I've tried
> > setting recurse => true, and using wild cards, but so far no luck.
> Any
> > suggestions short of specifying each file manually?
> 
> code snippet of what you'd like to do?
> 
> cheers pete

file { "bacula-clients":
      name    => "/etc/bacula/clients/*",
      owner   => "root",
      recurse => true,
      group   => "root",
      mode    => 655,
      source  => "puppet:///bacula/clients/*",
      notify  => Service[bacula],
}
(Continue reading)

Ross McKerchar | 1 May 2009 17:22

[Puppet Users] Cant get puppet to remove rpm's with circular dependencies


Hi Guys,

I'm trying to use puppet to remove some software on all our machines. The two rpm's I'm trying to remove are
dependent on each other, that is rpm A requires rpm B and rpm B requires rpm A.

The packages installed fine with puppet via yum (I just asked to install rpm A). Unfortunately puppet is
calling "rpm -e", not "yum remove" to remove packages so just asking to remove rpm A causes a dependency
error. I tried using "provider => yum" in the package definition but this was ignored.

To get round this I specified both packages: "package { [rpmA,rpmB]: ensure => absent }". Unfortunately
this doesn't work either. It appears puppet is running:

for package in packages:
        rpm -e package

As opposed to:

rpm -e " ".join(packages)

(no prizes for guessing what language I am most familiar with :)

Consequently I am unable to use puppet to remove this package. I cant easily resort to an exec statement as I
am doing the following:

class software{
        package{ [a,b]: ensure => present }
}

class software::uninstall{
(Continue reading)

T.Kendall@kew.org | 1 May 2009 17:45

[Puppet Users] Re: Puppet and yum repositories


Hi Brandon, thanks for this. I'm new to puppet and I have also
inherited a setup from a consultant who was at Kew before me.

I don't have a yum module, but I have a yum.pp in /etc/puppet/
manifests/classes which tells the puppetmaster  to distribute a
yum.conf and a repos.repo (a list of all local Fedora and CentOS
repos) to the puppet clients. My site.pp contains "include yum". I
don't
have anything anywhere called *.repo.erb. If I made yum just one of
many modules (put it in with ssh, amanda, mysql and all the others)
I would just add a line to /etc/puppet/manifests/modules.pp and add
something like your second snip into /etc/puppet/modules/yum/template/
to point to the local mirrors.

But where should I put this first bit of syntax beginning case
$operatingsystem and what should I call it? My current repos.repo
refers to $basearch and $releasever which are obviously variables set
from facter facts (like in your second snip) but I can't see where
those are set at the moment. Could I just change the current yum.pp to
include the case$operating system?

Help most welcome! Tim

On Apr 30, 10:19 pm, Brandon Evans <bev... <at> adicio.com> wrote:
> I prefer copying the repos over using a template.  This way all my
> CentOS boxes have the same repos.  If I were to add any Fedora boxes to
> the mix I'd add the repos to the Fedora {} block.
>
> case $operatingsystem  {
(Continue reading)

T.Kendall@kew.org | 1 May 2009 17:45

[Puppet Users] Re: Puppet and yum repositories


Hi Brandon, thanks for this. I'm new to puppet and I have also
inherited a setup from a consultant who was at Kew before me.

I don't have a yum module, but I have a yum.pp in /etc/puppet/
manifests/classes which tells the puppetmaster  to distribute a
yum.conf and a repos.repo (a list of all local Fedora and CentOS
repos) to the puppet clients. My site.pp contains "include yum". I
don't
have anything anywhere called *.repo.erb. If I made yum just one of
many modules (put it in with ssh, amanda, mysql and all the others)
I would just add a line to /etc/puppet/manifests/modules.pp and add
something like your second snip into /etc/puppet/modules/yum/template/
to point to the local mirrors.

But where should I put this first bit of syntax beginning case
$operatingsystem and what should I call it? My current repos.repo
refers to $basearch and $releasever which are obviously variables set
from facter facts (like in your second snip) but I can't see where
those are set at the moment. Could I just change the current yum.pp to
include the case$operating system?

Help most welcome! Tim

On Apr 30, 10:19 pm, Brandon Evans <bev... <at> adicio.com> wrote:
> I prefer copying the repos over using a template.  This way all my
> CentOS boxes have the same repos.  If I were to add any Fedora boxes to
> the mix I'd add the repos to the Fedora {} block.
>
> case $operatingsystem  {
(Continue reading)

Peter Meier | 1 May 2009 18:57
Picon
Gravatar

[Puppet Users] Re: Question regarding directories


Hi

> [...]
> Basically I want all of the client files I drop into puppet to be  
> transferred to the destination machine, without having to specify  
> each file individually(There are about 4 dozen of them). I'm also  
> trying to avoid having just one monster Bacula file.
> I have also tried it without the *. Any suggestions?
> On a side note, anyone know how to get to Outlook to bottom reply?

this should work, I do that a lot. But note: Until 0.25 copying large  
or a large amount of files might cause heavy memory usage!

file { "/etc/bacula/clients/":
   recurse => true,
   source  => "puppet:///bacula/clients/",
   notify  => Service[bacula],
   owner   => "root", group => "root", mode => 655;
}

basically you don't have to use the wild-card. Neither for Source nor  
for target. For sure you can add a path alias as well as you had.

cheers pete

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users <at> googlegroups.com
To unsubscribe from this group, send email to puppet-users+unsubscribe <at> googlegroups.com
(Continue reading)

Jim Pirzyk | 1 May 2009 19:27
Picon
Favicon

[Puppet Users] Re: Cant get puppet to remove rpm's with circular dependencies

I see the same dependency problem with ypbind and yp-tools that come  
with Fedora/RHEL/CentOS.

Changing to using an exec seems broken.  It prevents you from using  
the builtin provider that puppet supplies.

- JimP

On May 1, 2009, at 11:36 AM, Jason Rojas wrote:

>
> RPM circular dependencies have nothing to do with puppet.
> I would rebuild the packages and fix the dependency issue, then the
> problem would go away.
>
> If you are not comfortable with rebuilding the packages then my
> suggestion would be use an exec for this specific case doing a rpm -e
> --allmatches --nodeps --force package1 package2
>
> When you pass the package type an array of names, it iterates over
> them instead of using the array values  like a glob.
>
> Again, not a puppet issue but a circular dependency issue.
> -Jason
>
>
> On May 1, 2009, at 8:22 AM, Ross McKerchar wrote:
>
>>
>> Hi Guys,
(Continue reading)

Peter Meier | 1 May 2009 19:28
Picon
Gravatar

[Puppet Users] Re: Question regarding directories


Hi

>> this should work, I do that a lot. But note: Until 0.25 copying large
>> or a large amount of files might cause heavy memory usage!
>>
>> file { "/etc/bacula/clients/":
>>    recurse => true,
>>    source  => "puppet:///bacula/clients/",
>>    notify  => Service[bacula],
>>    owner   => "root", group => "root", mode => 655;
>> }
>>
>> basically you don't have to use the wild-card. Neither for Source nor
>> for target. For sure you can add a path alias as well as you had.
>>
>> cheers pete
>
> That works out great except for copying all the .svn files over, but  
> I can live with that. Thanks a ton.

http://reductivelabs.com/trac/puppet/wiki/TypeReference#file

ignore is your friend: ignore => '\.svn'

cheers pete

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users <at> googlegroups.com
(Continue reading)

genanr@allantgroup.com | 1 May 2009 20:10
Picon

[Puppet Users] Using arrays with the name attribute of service


I saw this mention in feature request #321, but here is what I have:

 service { "nfs" :
                        name => $operatingsystem ? {
                                Debian => [ "nfs-common", "nfs-kernel-
server" ],
                                Ubuntu => [ "nfs-common", "nfs-kernel-
server" ],
                                OpenSuSE => [ "nfs-client",  "nfs-
kernel-server" ],
                                default => [ "nfs-utils" ],
                        },
                        ensure=>running,
                        enable=>true,
                        hasstatus=>true,
                        restart=>true,
                        require=> $operatingsystem ? {
                                Debian => Package[ "nfs-common","nfs-
kernel-server"],
                                Ubuntu => Package[ "nfs-common","nfs-
kernel-server"],
                                OpenSuSE => Package["nfs-client", "nfs-
kernel-server"],
                                default => Package
[ "nfsserver","nfslock"],
                        },
        }

I would like to have ONE common service name for each distribution
(Continue reading)

Brandon Evans | 1 May 2009 20:14
Favicon

[Puppet Users] Re: Cant get puppet to remove rpm's with circular dependencies


I'm not sure broken is the right word.  The Package type needs a way to 
supply options to the underlying provider.

I ran into a similar issue with yum when I needed to install an RPM from 
a particular repo (yum --disablerepo=* --enablerepo=rpmforge)

Or install a package from a repo that is disabled by default (yum 
--enablrerepo=rpmforge)
I ended up reluctantly creating custom Exec's for both scenarios.

There is a feature request ticket open for the issue I mentioned

http://projects.reductivelabs.com/issues/915

-Brandon

Jim Pirzyk wrote:
> I see the same dependency problem with ypbind and yp-tools that come 
> with Fedora/RHEL/CentOS.
> 
> Changing to using an exec seems broken.  It prevents you from using the 
> builtin provider that puppet supplies.
> 
> - JimP
> 
> On May 1, 2009, at 11:36 AM, Jason Rojas wrote:
> 
>>
>> RPM circular dependencies have nothing to do with puppet.
(Continue reading)


Gmane