[Puppet Users] Re: facter + ssh = tput errors

2011-06-23 Thread josbal
Yeah thats what i was thinking Nathan, but wasn't sure if it was just
me.

Nan we are running facter 1.5.9 on RHEL 5.3 servers.

On Jun 24, 2:34 pm, Nan Liu  wrote:
> What version of facter? I'm not producing the error from 1.5.0 through
> 1.5.9 (did not have to pass -t).
>
> Thanks,
>
> Nan
>
>
>
>
>
>
>
> On Thu, Jun 23, 2011 at 8:03 PM, Nathan Clemons  wrote:
> > Sounds like a bug with facter handling headless running where a TTY is not
> > allocated (thus the error about $TERM not being set).
> > --
> > Nathan Clemons
> >http://www.livemocha.com
> > The worlds largest online language learning community
>
> > On Thu, Jun 23, 2011 at 7:56 PM, josbal  wrote:
>
> >> Hi Den,
>
> >> ssh -t seems to not produce the tput errors.
>
> >> But how come these tput errors are only presented when running facter
> >> command, and no others?
>
> >> Cheers,
> >> Josh
>
> >> On Jun 24, 8:17 am, Denmat  wrote:
> >> > Hi,
> >> > Haven't tested but what does ssh -t server2  give you?
>
> >> > Cheers
> >> > Den
>
> >> > On 24/06/2011, at 7:51, josbal  wrote:
>
> >> > > No one has seen this issue before?
>
> >> > > On Jun 23, 3:08 pm, josbal  wrote:
> >> > >> Hi Guys,
>
> >> > >> Not sure if this issue is a facter one or not, but thought i might
> >> > >> post here to see if anyone else has had the same issue.
>
> >> > >> When executing facter command on remote ssh server, i am getting tput
> >> > >> errors. However when running any other command on this same remote
> >> > >> ssh
> >> > >> server, the tput errors do not occur.
>
> >> > >> [user@server1 ~]$ ssh server2 'facter hostname'
> >> > >> tput: No value for $TERM and no -T specified
> >> > >> tput: No value for $TERM and no -T specified
> >> > >> tput: No value for $TERM and no -T specified
> >> > >> tput: No value for $TERM and no -T specified
> >> > >> server2
>
> >> > >> If i run facter locally on the remote server, there are no tput
> >> > >> errors.
>
> >> > >> [user@server2 ~]$ facter hostname
> >> > >> server2
>
> >> > >> In googling the errors, there are a lot of recommendations to check
> >> > >> profile scripts, etc, but the errors only occur with facter via ssh,
> >> > >> not any other commands and i can't see any references to tput in the
> >> > >> profile scripts?
>
> >> > >> Does anyone have any ideas as to what could be causing this issue and
> >> > >> how to fix?
>
> >> > > --
> >> > > 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@googlegroups.com.
> >> > > To unsubscribe from this group, send email to
> >> > > puppet-users+unsubscr...@googlegroups.com.
> >> > > For more options, visit this group
> >> > > athttp://groups.google.com/group/puppet-users?hl=en.
>
> >> --
> >> 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@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> puppet-users+unsubscr...@googlegroups.com.
> >> For more options, visit this group at
> >>http://groups.google.com/group/puppet-users?hl=en.
>
> > --
> > 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@googlegroups.com.
> > To unsubscribe from this group, send email to
> > puppet-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/puppet-users?hl=en.

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: How to manage many nodes easily?

2011-06-23 Thread Nan Liu
On Thu, Jun 23, 2011 at 7:43 PM, flex  wrote:
> er...that's what we use now, but define and external node cannot use
> together, we want to use external node to manage nodes configuration easily,
> so that's why i want to change all the define to class

ENC doesn't support resources, and defines are custom resources,
however we can still support ENC by defining this in an app class:

class app { $software ) {
  app::deploy { $software: }
}

define app::deploy {
  app:: add { $name:
 path => "/var/$name"
  }
}

node "some_system" {
  class { app:
 software => ['app1', 'app2', 'app3'],
  }
}

ENC support for parametrized class was added in 2.6.5+. If you need to
pass custom parameters to the resource, use a hash or write a wrapper
class for create_resource function to handle any complex usage, and
that function can be backported from 2.7 to 2.6.x.

Thanks,

Nan

> 2011/6/23 Martin Alfke 
>>
>> On 06/23/2011 11:52 AM, flex wrote:
>> > But i think class is singletons, means when using class you can not get
>> > more than one copy of the resource, that's the biggest difference
>> > between class and define.
>> >
>> > Your example give a duplicate definition error in my environment.
>> >
>> > So is this my fault or there another way?
>>
>> You are right. Using class does not work here. But you can use a define
>> with parameters and call the define with parameters later on:
>>
>> define application::add ($appname) {
>>        file { "/var/$appname":
>>                ensure => directory,
>>        }
>> }
>>
>> node 'node1' {
>>        application::add { app1: appname => app1 }
>>        application::add { app3: appname => app3 }
>> }
>> node 'node2' {
>>        application::add { app2: appname => app2 }
>>        application::add { anyname: appname => app4 }
>> }
>>
>> When calling the define you just have to make sure that the give name is
>> uniq.
>>
>>
>> >
>> > 2011/6/23 Martin Alfke mailto:tux...@gmail.com>>
>> >
>> >
>> >
>> >     On Jun 23, 7:44 am, Martin Alfke > >     > wrote:
>> >     > On 06/23/2011 04:35 AM, flex wrote:
>> >     >
>> >     > > These is another question, i have many defines which will apply
>> > an
>> >     > > application to sepcified path, called as:
>> >     >
>> >     > > application::add { "app1": path => "/var/app1" }
>> >     >
>> >     > > by this i can apply app1 and app2 in node1, app3 and app4 in
>> >     node2, etc.
>> >     >
>> >     > > now, how do i switch this to a class? Need i create a seperate
>> >     class for
>> >     > > all the apps although the only difference is the path?
>> >     >
>> >     > You can make use of parameterized classes:
>> >     >
>> >     > class application::add($appname) {
>> >     >         path => '/var/${appname}',
>> >     > ...
>> >     >
>> >     >  }
>> >     >
>> >     > Within your node definition you call the class with desired
>> > parameter:
>> >     >
>> >     > node 'node1' {
>> >     >         class application::add { appname => 'app1' }
>> >     >         class application::add { appname => 'app3' }
>> >     >
>> >     > }
>> >
>> >     The mentioned usage of parameterized classes in node definition is
>> >     wrong.
>> >     See:
>> >
>> > http://docs.puppetlabs.com/guides/language_guide.html#parameterised-classes
>> >
>> >     node 'node1' {
>> >        class { 'application::app': appname => 'app1' }
>> >        class { 'application::add': appname => 'app3' }
>> >     }
>> >
>> >     >
>> >     > Kind regards,
>> >     >
>> >     > Martin
>> >     >
>> >     >
>> >     >
>> >     >
>> >     >
>> >     >
>> >     >
>> >     >
>> >     >
>> >     > > 2011/6/21 Chris Phillips > >      > >     >>
>> >     >
>> >     > >     I would see a principle whereby nodes should not ever be
>> > defined
>> >     > >     within the manifest code at all. To me the manifests should
>> > be
>> >     > >     written to be very generic, and then use ENC's to modify
>> > their
>> >     > >     behaviour at a "user" level. There is still a lot of
>> >     inconsistency
>> >     > >     within Puppet as to how device specific data can be obtained
>> >     > >     (extlookup is very useful but rides roughshod over other
>> >     > >     architectural principles) but I try to stick to keeping all
>> >     > >     manifests generic. I write manifests to manage a package,
>> > then
>> >     > >     create a group in dashboard to relate that function to a
>> >     business
>> >     > >     need and then a node into that group.
>> >     >
>> >     > >     On 21 June 2011 14:48, Martin Willemsma
>> >     mailto:mwillem...@gmail.com>
>> >     > >     >>
>> >     wrote:
>> >     >
>> >     > >         We use /etc/puppet/node-definitions/*.pp in site.pp
>> >     similar to
>> >     > >         what Carles is saying.
>> >     >
>> >     > >         [node-definitions] is a git repo that

Re: [Puppet Users] Re: facter + ssh = tput errors

2011-06-23 Thread Nan Liu
What version of facter? I'm not producing the error from 1.5.0 through
1.5.9 (did not have to pass -t).

Thanks,

Nan

On Thu, Jun 23, 2011 at 8:03 PM, Nathan Clemons  wrote:
> Sounds like a bug with facter handling headless running where a TTY is not
> allocated (thus the error about $TERM not being set).
> --
> Nathan Clemons
> http://www.livemocha.com
> The worlds largest online language learning community
>
>
> On Thu, Jun 23, 2011 at 7:56 PM, josbal  wrote:
>>
>> Hi Den,
>>
>> ssh -t seems to not produce the tput errors.
>>
>> But how come these tput errors are only presented when running facter
>> command, and no others?
>>
>> Cheers,
>> Josh
>>
>> On Jun 24, 8:17 am, Denmat  wrote:
>> > Hi,
>> > Haven't tested but what does ssh -t server2  give you?
>> >
>> > Cheers
>> > Den
>> >
>> > On 24/06/2011, at 7:51, josbal  wrote:
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > > No one has seen this issue before?
>> >
>> > > On Jun 23, 3:08 pm, josbal  wrote:
>> > >> Hi Guys,
>> >
>> > >> Not sure if this issue is a facter one or not, but thought i might
>> > >> post here to see if anyone else has had the same issue.
>> >
>> > >> When executing facter command on remote ssh server, i am getting tput
>> > >> errors. However when running any other command on this same remote
>> > >> ssh
>> > >> server, the tput errors do not occur.
>> >
>> > >> [user@server1 ~]$ ssh server2 'facter hostname'
>> > >> tput: No value for $TERM and no -T specified
>> > >> tput: No value for $TERM and no -T specified
>> > >> tput: No value for $TERM and no -T specified
>> > >> tput: No value for $TERM and no -T specified
>> > >> server2
>> >
>> > >> If i run facter locally on the remote server, there are no tput
>> > >> errors.
>> >
>> > >> [user@server2 ~]$ facter hostname
>> > >> server2
>> >
>> > >> In googling the errors, there are a lot of recommendations to check
>> > >> profile scripts, etc, but the errors only occur with facter via ssh,
>> > >> not any other commands and i can't see any references to tput in the
>> > >> profile scripts?
>> >
>> > >> Does anyone have any ideas as to what could be causing this issue and
>> > >> how to fix?
>> >
>> > > --
>> > > 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@googlegroups.com.
>> > > To unsubscribe from this group, send email to
>> > > puppet-users+unsubscr...@googlegroups.com.
>> > > For more options, visit this group
>> > > athttp://groups.google.com/group/puppet-users?hl=en.
>>
>> --
>> 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@googlegroups.com.
>> To unsubscribe from this group, send email to
>> puppet-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: facter + ssh = tput errors

2011-06-23 Thread Nathan Clemons
Sounds like a bug with facter handling headless running where a TTY is not
allocated (thus the error about $TERM not being set).

--
Nathan Clemons
http://www.livemocha.com
The worlds largest online language learning community



On Thu, Jun 23, 2011 at 7:56 PM, josbal  wrote:

> Hi Den,
>
> ssh -t seems to not produce the tput errors.
>
> But how come these tput errors are only presented when running facter
> command, and no others?
>
> Cheers,
> Josh
>
> On Jun 24, 8:17 am, Denmat  wrote:
> > Hi,
> > Haven't tested but what does ssh -t server2  give you?
> >
> > Cheers
> > Den
> >
> > On 24/06/2011, at 7:51, josbal  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > No one has seen this issue before?
> >
> > > On Jun 23, 3:08 pm, josbal  wrote:
> > >> Hi Guys,
> >
> > >> Not sure if this issue is a facter one or not, but thought i might
> > >> post here to see if anyone else has had the same issue.
> >
> > >> When executing facter command on remote ssh server, i am getting tput
> > >> errors. However when running any other command on this same remote ssh
> > >> server, the tput errors do not occur.
> >
> > >> [user@server1 ~]$ ssh server2 'facter hostname'
> > >> tput: No value for $TERM and no -T specified
> > >> tput: No value for $TERM and no -T specified
> > >> tput: No value for $TERM and no -T specified
> > >> tput: No value for $TERM and no -T specified
> > >> server2
> >
> > >> If i run facter locally on the remote server, there are no tput
> > >> errors.
> >
> > >> [user@server2 ~]$ facter hostname
> > >> server2
> >
> > >> In googling the errors, there are a lot of recommendations to check
> > >> profile scripts, etc, but the errors only occur with facter via ssh,
> > >> not any other commands and i can't see any references to tput in the
> > >> profile scripts?
> >
> > >> Does anyone have any ideas as to what could be causing this issue and
> > >> how to fix?
> >
> > > --
> > > 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@googlegroups.com.
> > > To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> > > For more options, visit this group athttp://
> groups.google.com/group/puppet-users?hl=en.
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: facter + ssh = tput errors

2011-06-23 Thread josbal
Hi Den,

ssh -t seems to not produce the tput errors.

But how come these tput errors are only presented when running facter
command, and no others?

Cheers,
Josh

On Jun 24, 8:17 am, Denmat  wrote:
> Hi,
> Haven't tested but what does ssh -t server2  give you?
>
> Cheers
> Den
>
> On 24/06/2011, at 7:51, josbal  wrote:
>
>
>
>
>
>
>
> > No one has seen this issue before?
>
> > On Jun 23, 3:08 pm, josbal  wrote:
> >> Hi Guys,
>
> >> Not sure if this issue is a facter one or not, but thought i might
> >> post here to see if anyone else has had the same issue.
>
> >> When executing facter command on remote ssh server, i am getting tput
> >> errors. However when running any other command on this same remote ssh
> >> server, the tput errors do not occur.
>
> >> [user@server1 ~]$ ssh server2 'facter hostname'
> >> tput: No value for $TERM and no -T specified
> >> tput: No value for $TERM and no -T specified
> >> tput: No value for $TERM and no -T specified
> >> tput: No value for $TERM and no -T specified
> >> server2
>
> >> If i run facter locally on the remote server, there are no tput
> >> errors.
>
> >> [user@server2 ~]$ facter hostname
> >> server2
>
> >> In googling the errors, there are a lot of recommendations to check
> >> profile scripts, etc, but the errors only occur with facter via ssh,
> >> not any other commands and i can't see any references to tput in the
> >> profile scripts?
>
> >> Does anyone have any ideas as to what could be causing this issue and
> >> how to fix?
>
> > --
> > 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@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > puppet-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/puppet-users?hl=en.

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: How to manage many nodes easily?

2011-06-23 Thread flex
Thank you for your advice. Actually, the application need to be deployed is
a webapp and may be modified many times a day, so package it is too heavy
for us.

2011/6/23 jcbollinger 

>
> On Jun 22, 9:35 pm, flex  wrote:
> > These is another question, i have many defines which will apply an
> > application to sepcified path, called as:
> >
> > application::add { "app1": path => "/var/app1" }
> >
> > by this i can apply app1 and app2 in node1, app3 and app4 in node2, etc.
> >
> > now, how do i switch this to a class? Need i create a seperate class for
> all
> > the apps although the only difference is the path?
>
>
> I recommend that you package your applications for your nodes' native
> packaging system (RPM, apt, etc.), and use Package resources to manage
> them.  Creating a local repository for your packages helps make this
> approach very smooth.  You still need to put the Package resources
> into one or more classes, but you don't need to worry about specifying
> a path for each one.
>
> Although creating packages may seem intimidating if you haven't done
> it before, it's really not that hard, and you get management benefits
> that extend well beyond Puppet.
>
>
> John
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>


-- 
System Administrator, Focus on System Management and Basic Development

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: How to manage many nodes easily?

2011-06-23 Thread flex
er...that's what we use now, but define and external node cannot use
together, we want to use external node to manage nodes configuration easily,
so that's why i want to change all the define to class

2011/6/23 Martin Alfke 

> On 06/23/2011 11:52 AM, flex wrote:
> > But i think class is singletons, means when using class you can not get
> > more than one copy of the resource, that's the biggest difference
> > between class and define.
> >
> > Your example give a duplicate definition error in my environment.
> >
> > So is this my fault or there another way?
>
> You are right. Using class does not work here. But you can use a define
> with parameters and call the define with parameters later on:
>
> define application::add ($appname) {
>file { "/var/$appname":
>ensure => directory,
>}
> }
>
> node 'node1' {
>application::add { app1: appname => app1 }
>application::add { app3: appname => app3 }
> }
> node 'node2' {
>application::add { app2: appname => app2 }
>application::add { anyname: appname => app4 }
> }
>
> When calling the define you just have to make sure that the give name is
> uniq.
>
>
> >
> > 2011/6/23 Martin Alfke mailto:tux...@gmail.com>>
> >
> >
> >
> > On Jun 23, 7:44 am, Martin Alfke  > > wrote:
> > > On 06/23/2011 04:35 AM, flex wrote:
> > >
> > > > These is another question, i have many defines which will apply
> an
> > > > application to sepcified path, called as:
> > >
> > > > application::add { "app1": path => "/var/app1" }
> > >
> > > > by this i can apply app1 and app2 in node1, app3 and app4 in
> > node2, etc.
> > >
> > > > now, how do i switch this to a class? Need i create a seperate
> > class for
> > > > all the apps although the only difference is the path?
> > >
> > > You can make use of parameterized classes:
> > >
> > > class application::add($appname) {
> > > path => '/var/${appname}',
> > > ...
> > >
> > >  }
> > >
> > > Within your node definition you call the class with desired
> parameter:
> > >
> > > node 'node1' {
> > > class application::add { appname => 'app1' }
> > > class application::add { appname => 'app3' }
> > >
> > > }
> >
> > The mentioned usage of parameterized classes in node definition is
> > wrong.
> > See:
> >
> http://docs.puppetlabs.com/guides/language_guide.html#parameterised-classes
> >
> > node 'node1' {
> >class { 'application::app': appname => 'app1' }
> >class { 'application::add': appname => 'app3' }
> > }
> >
> > >
> > > Kind regards,
> > >
> > > Martin
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > > 2011/6/21 Chris Phillips  >   > >>
> > >
> > > > I would see a principle whereby nodes should not ever be
> defined
> > > > within the manifest code at all. To me the manifests should
> be
> > > > written to be very generic, and then use ENC's to modify
> their
> > > > behaviour at a "user" level. There is still a lot of
> > inconsistency
> > > > within Puppet as to how device specific data can be obtained
> > > > (extlookup is very useful but rides roughshod over other
> > > > architectural principles) but I try to stick to keeping all
> > > > manifests generic. I write manifests to manage a package,
> then
> > > > create a group in dashboard to relate that function to a
> > business
> > > > need and then a node into that group.
> > >
> > > > On 21 June 2011 14:48, Martin Willemsma
> > mailto:mwillem...@gmail.com>
> > > > >>
> > wrote:
> > >
> > > > We use /etc/puppet/node-definitions/*.pp in site.pp
> > similar to
> > > > what Carles is saying.
> > >
> > > > [node-definitions] is a git repo thats being synced on
> both
> > > > puppermasters. This happens on every push to origin
> > >
> > > > We use the 'default' node which does the baseline
> > configuration
> > > > based on a 'role'
> > >
> > > > In a separate file $fqdn.pp I place the definitions for
> > a node.
> > >
> > > > Are there more people using this kind of approach?
> > >
> > > > ---
> > > > Martin
> > >
> > > > 2011/6/21 Carles Amig�  > 
> > > >  > >>
> > >
> > > > We had the same problem and we just separated each
> > node (or
> > > > group of nodes) in on

Re: [Puppet Users] Package pre-requisites prior to file exec

2011-06-23 Thread Nigel Kersten
On Thu, Jun 23, 2011 at 4:07 PM, Craig White  wrote:
> class nginx::install {
>  $prerequisites = [ "build-essential", "libcurl4-openssl-dev", "libssl-dev", 
> "zlib1g-dev" ]
>  case $operatingsystem {
>    centos, redhat: {
>    }
>    debian, ubuntu: {
>      package { $prerequisites : ensure => "installed" :
>        ensure => present {
>          exec { "Installing nginx via passenger":
>            path        => "/bin:/usr/bin",
>            environment => "HOME=/root",
>            command     => "passenger-install-nginx-module --auto-download 
> --auto",
>            user        => "root",
>            group       => "root",
>            unless      => "ls -l /opt | grep nginx",
>            logoutput   => on_failure,
>          }
>        }
>        file {"/etc/init.d/nginx":
>          source => "puppet:///modules/nginx/nginx-initd",
>          owner   => root,
>          group   => root,
>          mode    => 755,
>          require => Class["nginx::install"],
>          notify  => Class["nginx::service"],
>        }
>      }
>    }
>  }
> }
>
> The above has a syntax error on line 7 and the catalog won't build but 
> essentially I want to 'ensure' that the pre-requsite packages are installed 
> prior to attempting to execute the command (because if the pre-requisites 
> aren't there, the command will fail).

That definitely won't compile :)

You should be able to just declare the exec and package(s) resources
separately and define a relationship, like:

exec { "Installing nginx via passenger":
  path        => "/bin:/usr/bin",
  environment => "HOME=/root",
  command     => "passenger-install-nginx-module --auto-download --auto",
  user        => "root",
  group       => "root",
  unless      => "ls -l /opt | grep nginx",
  logoutput   => on_failure,
  require => Package[$prerequisites],
}

That last line should work for you. Otherwise you could define it the
opposite way around:

package { $prerequisites:
  ensure => installed,
  before  => Exec["Installing nginx via passenger"],
}

Both those methods should work, but I have a vague memory of the first
method failing in a point release or two.

What version of Puppet are you running? You may have a much clearer
way of expressing the conditional you're using than the somewhat messy
case statement you're using at the moment.

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Announce: Facter 1.6.0

2011-06-23 Thread Michael Stahnke
Facter 1.6.0 is a feature release containing fixes, updates and refactoring.

This release is available for download at:
 http://puppetlabs.com/downloads/facter/facter-1.6.0.tar.gz

See the Verifying Puppet Download section at:
 
http://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppet#Verifying+Puppet+Downloads

Please report feedback via the Puppet Labs Redmine site, using an
affected version of 1.6.0:
 http://projects.puppetlabs.com/projects/facter/

You can also install via rubygems.org.

Full Release Notes at: https://projects.puppetlabs.com/projects/facter/wiki/Wiki


# Facter 1.6.0 Release Notes

##  License Change

Facter has moved to Apache 2.0 license

This is in line with our proposed plan to change
from the GPL license to Apache 2.0 for Puppet in 2.7.0 and
Facter in 1.6.0.

Please see this link for further explanation:

https://groups.google.com/d/topic/puppet-users/NuspYhMpE5o/discussion

## Speed Improvements

(#7670) Stop preloading all facts in the application

If a requested fact isn't found in the same location as its name, we want to
load all of the facts to find it. However, to simplify that, we
were previously
just preloading all the facts every time. Because requesting a fact now
implicitly loads all facts if necessary, we can rely on that,
providing results
much more quickly in the case where facts do match their filenames.


## Fact Detection Improvements

 (#6728) Facter improperly detects openvzve on CloudLinux systems

Make the openvz check for more than just the vz directory to be sure it's
OpenVZ.

Update the OpenVZ fact to be slightly more resilient in it's checking of
OpenVZ, so it doesn't clash with CloudLinux's LVE container system.


  (#6740) facter doesn't always respect facts in environment variables

On an OSX host:

$ facter operatingsystem
Darwin

$ facter_operatingsystem=Not_Darwin facter operatingsystem
Not_Darwin

But on a linux/solaris host:

$ facter operatingsystem
CentOS

$ facter_operatingsystem=Not_CentOS facter operatingsystem
CentOS

As the operatingsystem fact resolution for linux-based kernels has higher
precedence than the environment variable as it has more matching
confines than
the value from the environment variable.

This patch adds from_environment to the resolution mechanism,
which makes the
resolution have an artificially high weight by claiming the length of its
confines array is 1 billion.

## Documentation

   (#5394) Document each Facter fact.

Document all the builtin Facter facts in puppetdoc/rdoc format.

This is laying the ground work for using a tool like puppet doc, or puppet
describe but for facter, so you can see what a fact is for and how it
resolves this. This is the "leg work" of documenting the actual facts, and
the syntax of them may change in future.



## CHANGELOG Highlights
926e912 (#7670) Stop preloading all facts in the application
2255abe (#7670) Never fail to find a fact that is present
6b1cd16 (#6614) Update ipaddress6 fact to work with Ruby 1.9
21fe217 (#6612) Changed uptime spec to be endian agnostic
19f96b5 (#6728) Facter improperly detects openvzve on CloudLinux systems
5b10173 (#5135) Fix faulty logic in physicalprocessorcount
53cd946 Ensures that ARP facts are returned only on EC2 hosts
bfa038d Fixed #6974 - Moved to Apache 2.0 license
d56bca8 refactor the mechanism for allowing for resolution
ordering to be influenced
9f4c5c6 (#6740) facter doesn't always respect facts in environment variables
bfc16f6 (#2714) Added timeout to prtdiag resulution
3efa9d7 (#3856) Add virtualbox detection via lspci (graphics
card), dmidecode, and prtdiag for Solaris and corresponding tests.
Darwin case is not handled yet.
7c80172 (#6883) Update Facter install.rb to be slightly more informative.
d31e3f9 (#5394) Document each Facter fact.
d6967a0 (#6613) Switch solaris macaddress fact to netstat

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Package pre-requisites prior to file exec

2011-06-23 Thread Craig White
class nginx::install {
  $prerequisites = [ "build-essential", "libcurl4-openssl-dev", "libssl-dev", 
"zlib1g-dev" ]
  case $operatingsystem {
centos, redhat: {
}
debian, ubuntu: {
  package { $prerequisites : ensure => "installed" :
ensure => present {
  exec { "Installing nginx via passenger":
path=> "/bin:/usr/bin",
environment => "HOME=/root",
command => "passenger-install-nginx-module --auto-download 
--auto",
user=> "root",
group   => "root",
unless  => "ls -l /opt | grep nginx",
logoutput   => on_failure,
  }
}
file {"/etc/init.d/nginx":
  source => "puppet:///modules/nginx/nginx-initd",
  owner   => root,
  group   => root,
  mode=> 755,
  require => Class["nginx::install"],
  notify  => Class["nginx::service"],
}
  }
}
  }
}

The above has a syntax error on line 7 and the catalog won't build but 
essentially I want to 'ensure' that the pre-requsite packages are installed 
prior to attempting to execute the command (because if the pre-requisites 
aren't there, the command will fail).

I think I am close but the best way to handle this is eluding me (and my google 
searches).

-- 
Craig White ~~  craig.wh...@ttiltd.com
1.800.869.6908 ~~~ www.ttiassessments.com 

Need help communicating between generations at work to achieve your desired 
success? Let us help!

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: [Puppet-dev] Announce: 2.6.9 Released

2011-06-23 Thread Derek J. Balling
Todd,

Do you have an ETA for 2.7.x RPMs in that repo by any chance?

Cheers,
D

On Jun 23, 2011, at 11:21 AM, Todd Zullinger wrote:

> Michael Stahnke wrote:
>> This release is a maintenance release of the 2.6.x series of Puppet.
>> This will likely be the last release in the 2.6.x series for Puppet,
>> now that 2.7 is out.
> 
> For those using Fedora or RHEL/CentOS, I've updated the yum repos at:
> 
>http://tmz.fedorapeople.org/repo/puppet/
> 
> Packages for EL 4 - 6 and Fedora 13 - 15 are available for testing.
> Add the puppet.repo file from either the epel or fedora directories to
> /etc/yum.repos.d to enable.
> 
> If you find problems with the packaging, please let me know.  If you
> find other bugs, please file them in redmine:
> 
>http://projects.puppetlabs.com/projects/puppet/issues
> 
> -- 
> ToddOpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
> ~~
> The policy of the American government is to leave its citizens free,
> neither restraining nor aiding them in their pursuits.
>-- Thomas Jefferson
> 

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: facter + ssh = tput errors

2011-06-23 Thread Denmat
Hi,
Haven't tested but what does ssh -t server2  give you?

Cheers
Den

On 24/06/2011, at 7:51, josbal  wrote:

> No one has seen this issue before?
> 
> On Jun 23, 3:08 pm, josbal  wrote:
>> Hi Guys,
>> 
>> Not sure if this issue is a facter one or not, but thought i might
>> post here to see if anyone else has had the same issue.
>> 
>> When executing facter command on remote ssh server, i am getting tput
>> errors. However when running any other command on this same remote ssh
>> server, the tput errors do not occur.
>> 
>> [user@server1 ~]$ ssh server2 'facter hostname'
>> tput: No value for $TERM and no -T specified
>> tput: No value for $TERM and no -T specified
>> tput: No value for $TERM and no -T specified
>> tput: No value for $TERM and no -T specified
>> server2
>> 
>> If i run facter locally on the remote server, there are no tput
>> errors.
>> 
>> [user@server2 ~]$ facter hostname
>> server2
>> 
>> In googling the errors, there are a lot of recommendations to check
>> profile scripts, etc, but the errors only occur with facter via ssh,
>> not any other commands and i can't see any references to tput in the
>> profile scripts?
>> 
>> Does anyone have any ideas as to what could be causing this issue and
>> how to fix?
> 
> -- 
> 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@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
> 

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: facter + ssh = tput errors

2011-06-23 Thread josbal
No one has seen this issue before?

On Jun 23, 3:08 pm, josbal  wrote:
> Hi Guys,
>
> Not sure if this issue is a facter one or not, but thought i might
> post here to see if anyone else has had the same issue.
>
> When executing facter command on remote ssh server, i am getting tput
> errors. However when running any other command on this same remote ssh
> server, the tput errors do not occur.
>
> [user@server1 ~]$ ssh server2 'facter hostname'
> tput: No value for $TERM and no -T specified
> tput: No value for $TERM and no -T specified
> tput: No value for $TERM and no -T specified
> tput: No value for $TERM and no -T specified
> server2
>
> If i run facter locally on the remote server, there are no tput
> errors.
>
> [user@server2 ~]$ facter hostname
> server2
>
> In googling the errors, there are a lot of recommendations to check
> profile scripts, etc, but the errors only occur with facter via ssh,
> not any other commands and i can't see any references to tput in the
> profile scripts?
>
> Does anyone have any ideas as to what could be causing this issue and
> how to fix?

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Make puppet automatically recognize new files in nodes directory?

2011-06-23 Thread Aaron Grewell
I have a similar command in my svn post-commit.  It works well for
convincing Puppet that something has happened.

On Thu, Jun 23, 2011 at 1:10 PM, Pheran  wrote:

> Hmm, if that's enough to make it reread all the nodes, then I suppose
> I could have my git hook scripts that syncs the puppet manifests from
> my git repo always touch the site.pp file after it fires.  Any other
> good methods for handling this?
>
> On Jun 23, 4:05 pm, Aaron Grewell  wrote:
> > touch site.pp?
> > On Jun 23, 2011 1:01 PM, "Pheran"  wrote:> So, instead
> of defining all my nodes in one file, I use what seems to
> > > be a fairly common practice, from site.pp I do:
> >
> > > import 'nodes/*'
> >
> > > Then I have a nodes directory containing a .pp file for each node.
> > > The only problem with this setup is that puppet seems oblivious to new
> > > node files in the nodes directory until you do a "service puppetmaster
> > > restart". Is there any way to have puppet automatically find those
> > > new files without restarting? Alternately, does anyone have a good
> > > method for automating the necessary restart? Thanks.
> >
> > > --
> > > 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@googlegroups.com.
> > > To unsubscribe from this group, send email to
> >
> > puppet-users+unsubscr...@googlegroups.com.> For more options, visit this
> group at
> >
> > http://groups.google.com/group/puppet-users?hl=en.
> >
> >
> >
> >
> >
> >
> >
> >
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Make puppet automatically recognize new files in nodes directory?

2011-06-23 Thread Daniel Pittman
I don't believe so.  I don't have time to dig deeply into the code and
confirm right now, but I believe we don't model include operations as
a glob, just as the resultant set of files to watch.  Touching site.pp
will trigger it to reparse, which will re-run the import operation and
watch those files for changes.

So, I think this is the only present solution for the issue; you might
want to find the existing bug (which I bet there is, but file a new
one if you can't turn it up) and add your voice to those asking that
it get fixed. :)

Regards,
Daniel

On Thu, Jun 23, 2011 at 13:10, Pheran  wrote:
> Hmm, if that's enough to make it reread all the nodes, then I suppose
> I could have my git hook scripts that syncs the puppet manifests from
> my git repo always touch the site.pp file after it fires.  Any other
> good methods for handling this?
>
> On Jun 23, 4:05 pm, Aaron Grewell  wrote:
>> touch site.pp?
>> On Jun 23, 2011 1:01 PM, "Pheran"  wrote:> So, instead of 
>> defining all my nodes in one file, I use what seems to
>> > be a fairly common practice, from site.pp I do:
>>
>> > import 'nodes/*'
>>
>> > Then I have a nodes directory containing a .pp file for each node.
>> > The only problem with this setup is that puppet seems oblivious to new
>> > node files in the nodes directory until you do a "service puppetmaster
>> > restart". Is there any way to have puppet automatically find those
>> > new files without restarting? Alternately, does anyone have a good
>> > method for automating the necessary restart? Thanks.
>>
>> > --
>> > 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@googlegroups.com.
>> > To unsubscribe from this group, send email to
>>
>> puppet-users+unsubscr...@googlegroups.com.> For more options, visit this 
>> group at
>>
>> http://groups.google.com/group/puppet-users?hl=en.
>>
>>
>>
>>
>>
>>
>>
>>
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>
>



-- 
⎋ Puppet Labs Developer – http://puppetlabs.com
✉ Daniel Pittman 
✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775
♲ Made with 100 percent post-consumer electrons

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] apache vhosts include files

2011-06-23 Thread Craig White

On Jun 23, 2011, at 12:47 PM, Daniel Pittman wrote:

> On Thu, Jun 23, 2011 at 12:25, Craig White  wrote:
>> 
>> Perhaps I am going at this the wrong way but I am getting far using the 
>> vhosts methodology from Pro Puppet and now I want to optionally include a 
>> static text file.
>> 
>> <% if location_file_inc != '' %->
>>  <% include #{location_file_inc} %>
>> <% end -%>
>> 
>> 
>> and I have '/etc/puppet/modules/apache/files/test.txt' in $location_file_inc 
>> with a bunch of rewrite rules & conditions and even some specific admin type 
>> subdirectory access controls which clearly are vhost specific and not well 
>> generalized.
>> 
>> The above code fails to build a catalog.
>> 
>> What is the best way to 'include' a file in an erb template (I think I am 
>> good with the conditionals).
> 
> So, erb doesn't have any 'include' operation.  If your file is just
> static text, this should work:
> 
><%= File.open('/path/to/file').read %>
> 
> If it has actual ERB content, life is more difficult.
> 
> As an alternative, some folks use one of the various 'concat' file
> modules, like the one by R.I.Pienaar, or the providerised version
> recently posted to the dev list, that allows you to construct the
> final file on the client.

File.open is enough for the time being - thanks. I forgot that this was 
available to me.

Craig

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] apache vhosts include files

2011-06-23 Thread Markus Falb
On 23.6.2011 21:47, Daniel Pittman wrote:
> On Thu, Jun 23, 2011 at 12:25, Craig White  wrote:
>>
>> Perhaps I am going at this the wrong way but I am getting far using the 
>> vhosts methodology from Pro Puppet and now I want to optionally include a 
>> static text file.
>>
>> <% if location_file_inc != '' %->
>>  <% include #{location_file_inc} %>
>> <% end -%>
>>
>>
>> and I have '/etc/puppet/modules/apache/files/test.txt' in $location_file_inc 
>> with a bunch of rewrite rules & conditions and even some specific admin type 
>> subdirectory access controls which clearly are vhost specific and not well 
>> generalized.
>>
>> The above code fails to build a catalog.
>>
>> What is the best way to 'include' a file in an erb template (I think I am 
>> good with the conditionals).
> 
> So, erb doesn't have any 'include' operation.  If your file is just
> static text, this should work:
> 
> <%= File.open('/path/to/file').read %>
> 
> If it has actual ERB content, life is more difficult.
> 
> As an alternative, some folks use one of the various 'concat' file
> modules, like the one by R.I.Pienaar, or the providerised version
> recently posted to the dev list, that allows you to construct the
> final file on the client.

As another alternative, one could handle the include at apache level.
Make the location_file_inc a separate file and include it from your
vhost config.

-- 
Kind Regards, Markus Falb



signature.asc
Description: OpenPGP digital signature


[Puppet Users] Re: Make puppet automatically recognize new files in nodes directory?

2011-06-23 Thread Pheran
Hmm, if that's enough to make it reread all the nodes, then I suppose
I could have my git hook scripts that syncs the puppet manifests from
my git repo always touch the site.pp file after it fires.  Any other
good methods for handling this?

On Jun 23, 4:05 pm, Aaron Grewell  wrote:
> touch site.pp?
> On Jun 23, 2011 1:01 PM, "Pheran"  wrote:> So, instead of 
> defining all my nodes in one file, I use what seems to
> > be a fairly common practice, from site.pp I do:
>
> > import 'nodes/*'
>
> > Then I have a nodes directory containing a .pp file for each node.
> > The only problem with this setup is that puppet seems oblivious to new
> > node files in the nodes directory until you do a "service puppetmaster
> > restart". Is there any way to have puppet automatically find those
> > new files without restarting? Alternately, does anyone have a good
> > method for automating the necessary restart? Thanks.
>
> > --
> > 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@googlegroups.com.
> > To unsubscribe from this group, send email to
>
> puppet-users+unsubscr...@googlegroups.com.> For more options, visit this 
> group at
>
> http://groups.google.com/group/puppet-users?hl=en.
>
>
>
>
>
>
>
>

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Make puppet automatically recognize new files in nodes directory?

2011-06-23 Thread Aaron Grewell
touch site.pp?
On Jun 23, 2011 1:01 PM, "Pheran"  wrote:
> So, instead of defining all my nodes in one file, I use what seems to
> be a fairly common practice, from site.pp I do:
>
> import 'nodes/*'
>
> Then I have a nodes directory containing a .pp file for each node.
> The only problem with this setup is that puppet seems oblivious to new
> node files in the nodes directory until you do a "service puppetmaster
> restart". Is there any way to have puppet automatically find those
> new files without restarting? Alternately, does anyone have a good
> method for automating the necessary restart? Thanks.
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to
puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
>

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Make puppet automatically recognize new files in nodes directory?

2011-06-23 Thread Pheran
So, instead of defining all my nodes in one file, I use what seems to
be a fairly common practice, from site.pp I do:

import 'nodes/*'

Then I have a nodes directory containing a .pp file for each node.
The only problem with this setup is that puppet seems oblivious to new
node files in the nodes directory until you do a "service puppetmaster
restart".  Is there any way to have puppet automatically find those
new files without restarting?  Alternately, does anyone have a good
method for automating the necessary restart?  Thanks.

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] apache vhosts include files

2011-06-23 Thread Daniel Pittman
On Thu, Jun 23, 2011 at 12:25, Craig White  wrote:
>
> Perhaps I am going at this the wrong way but I am getting far using the 
> vhosts methodology from Pro Puppet and now I want to optionally include a 
> static text file.
>
> <% if location_file_inc != '' %->
>  <% include #{location_file_inc} %>
> <% end -%>
>
>
> and I have '/etc/puppet/modules/apache/files/test.txt' in $location_file_inc 
> with a bunch of rewrite rules & conditions and even some specific admin type 
> subdirectory access controls which clearly are vhost specific and not well 
> generalized.
>
> The above code fails to build a catalog.
>
> What is the best way to 'include' a file in an erb template (I think I am 
> good with the conditionals).

So, erb doesn't have any 'include' operation.  If your file is just
static text, this should work:

<%= File.open('/path/to/file').read %>

If it has actual ERB content, life is more difficult.

As an alternative, some folks use one of the various 'concat' file
modules, like the one by R.I.Pienaar, or the providerised version
recently posted to the dev list, that allows you to construct the
final file on the client.

Regards,
Daniel
-- 
⎋ Puppet Labs Developer – http://puppetlabs.com
✉ Daniel Pittman 
✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775
♲ Made with 100 percent post-consumer electrons

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] apache vhosts include files

2011-06-23 Thread Craig White
Perhaps I am going at this the wrong way but I am getting far using the vhosts 
methodology from Pro Puppet and now I want to optionally include a static text 
file.

<% if location_file_inc != '' %->
  <% include #{location_file_inc} %>
   
<% end -%>


and I have '/etc/puppet/modules/apache/files/test.txt' in $location_file_inc 
with a bunch of rewrite rules & conditions and even some specific admin type 
subdirectory access controls which clearly are vhost specific and not well 
generalized.

The above code fails to build a catalog.

What is the best way to 'include' a file in an erb template (I think I am good 
with the conditionals).

Thanks

-- 
Craig White ~~  craig.wh...@ttiltd.com
1.800.869.6908 ~~~ www.ttiassessments.com 

Need help communicating between generations at work to achieve your desired 
success? Let us help!

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Puppet module layout

2011-06-23 Thread Nigel Kersten
On Thu, Jun 23, 2011 at 3:09 AM, Bruce Bushby  wrote:
> Thanks Nigel, appreciate the heads up!
>
> I'm finding that puppet module are great when you want a module for
> "ssh" or a module for "sudoers"  ...but I can't find an example where
> there is a module called "os" which contains "ssh.pp" ,
> "prod_sudoers.pp" , "dev_sudoers.pp" , "userauth.pp",
> "iptables.pp" etc

Here are the file mappings to class names so that the autoloader finds them.

$modulepath/foo/manifests/init.pp -> class foo { ... }
$modulepath/foo/manifests/bar.pp -> class foo::bar { ... }
$modulepath/foo/manifests/bar/baz.pp -> class foo::bar::baz { ... }

Is that what you meant Bruce?

>
> Then /etc/puppet/manifest/site.pp would include the module "os"
>
> and then /etc/puppet/modules/os/manifest/init.pp  would include the
> various "pp" components for various hosts lists.
>
> Is this even possible?
>
>
>
>
> On Jun 20, 5:50 pm, Nigel Kersten  wrote:
>> On Sat, Jun 18, 2011 at 1:29 AM, Bruce Bushby wrote:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> > Hello
>>
>> > I'm new to large scale puppet deployment and was hoping the list could
>> > offer some pointers on "module layout"
>>
>> > My initial "layout" was motivated by a need to "harden" our Linux
>> > systems. I grouped the various hardening configs into:
>>
>> > Kernel
>> > OS
>> > Network
>> > Shell
>> > Files
>> > Application
>>
>> > I'm hoping I can create the same module structure within puppet.
>>
>> In my experience, these module categories are too broad and it will make
>> maintenance difficult.
>>
>> You don't want to get too fine-grained with your modules, but if you keep
>> things this broad, you'll end up having lots of complicated relationships
>> like Class[os::foo] -> Class[files::foo]
>>
>> I made this mistake on a large deployment and regretted it.
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>
>



-- 
Nigel Kersten
Product, Puppet Labs
@nigelkersten

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] apt-key and untrusted packages

2011-06-23 Thread Craig White

On Jun 22, 2011, at 10:32 PM, Martin Alfke wrote:

> On 06/22/2011 11:29 PM, Craig White wrote:
>> Perhaps this is a Debian/Ubuntu question and not a puppet problem but...
>> 
>> Seems as though the key is good but the install failed.
>> 
>> # apt-key list
>> /etc/apt/trusted.gpg
>> 
>> --- snip ---
>> 
>> pub   2048R/7F0CEB10 2010-02-05
>> uid  Richard Kreuter 
>> 
>> and the 7F0CEF10 key (10gen) is the key in question
>> 
>> anyway, puppet failed to install the package and running the install from 
>> the command line, I can sort of see why...
> 
> You need to run apt-get update after import of the key.
> apt-get install will read from local cache which still has no
> information regarding the key.

duh... I figured that out yesterday and 'replied' but apparently only to myself 
and not the list (not used to Apple Mail)

this is what I wrote...

Solved... 

apparently just a matter of apt-get update

sheesh

in my modules/apt/manifests/apt.pp I have

 exec{"/usr/bin/apt-get update":
   refreshonly => true,
   subscribe   => File["/etc/apt/sources.list"],
   require => File["/etc/apt/sources.list"],
 }

is there any way I can be certain that it happens?

Craig

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Using require and notify across class resources cause a dependency cycle

2011-06-23 Thread jcbollinger


On Jun 23, 9:54 am, Nigel Kersten  wrote:
> On Thu, Jun 23, 2011 at 6:01 AM, jcbollinger wrote:
>
>
>
> > While I'm on my soapbox, this is one reason why I don't like
> > interclass dependencies very much, and why run stages (which magnify
> > this problem) need to be approached with caution.  There is certainly
> > something to be said for the layer of abstraction achieved by relying
> > on interclass dependencies instead of on finer-grained inter-resource
> > dependencies, but you can't do it halfway.
>
> I agree with the halfway bit :) but generally I feel that class-to-class
> relationships are much easier to maintain than resource-to-resource
> relationships that cross class boundaries.
>
> It allows you to change the internal relationships and behavior of classes
> without worrying so much about external consumers of your class.
> Encapsulation is a good thing.


I quite agree that encapsulation is a good thing, but it is
impractical to expect rigorous encapsulation in Puppet's problem
domain.  System configuration does not break up neatly along any
hierarchical lines I have ever considered, so there are many non-
trivial questions of which class should own which resource, and of how
non-owning classes can express their own requirements.  The OP's
problem is evidently an example.

Furthermore, remember that Puppet resources all have global scope,
regardless of where they are declared, so Puppet classes and modules
provide rather incomplete encapsulation anyway.  Their greatest
usefulness is instead in the layer(s) of *abstraction* they embody.

Right now, the main advantages of prefering resource-level
relationships are a lower likelihood of dependency cycles, and a
clearer path to resolving any that arise.  As Puppet development
continues, however, avoiding unnecessary relationships among resources
could conceivably facilitate useful optimizations, such as combined
application of multiple Package resources.  Though presently Puppet
itself may not do much with it, in general, the more freedom one can
afford to an expert system, the better.


> Your modules are significantly less reusable if you need to document
> required individual resource relationships.


Given that Puppet permits resources to be managed only in one place,
reusable modules need to thoroughly document all the resources they
manage anyway, or at least to document an exclusive claim to an
appropriate swath of resources.  How reusable you can hope a module
will be depends greatly on how diverse the demands are on the
resources it manages.


Cheers,
John

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Puppet on Windows

2011-06-23 Thread Nigel Kersten
On Thu, Jun 23, 2011 at 10:07 AM, Arm Adam  wrote:
> Hi all,
>
> I realize this thread is a little old but hoping someone can tell me
> if much progress has been made on getting Puppet running on Windows.
> I just tried to set up an agent according to the directions at
> http://projects.puppetlabs.com/projects/1/wiki/Puppet_Windows on
> Windows Server 2008 x86, and got the bug (http://
> projects.puppetlabs.com/issues/6693) exactly as described with version
> 2.7.1.  Can someone tell me what the timeframe is for a release that
> supports Windows puppet agents connecting to an existing Puppetmaster?

+ puppet-users as I think this was accidentally a private reply.

We're aiming to deliver this in Q3 of this year, with work starting next month.

We've had a few meetings in person talking about the required support,
and that's going to be captured in a public ticket people can watch
very soon, I apologize for the lack of transparency here.


-- 
Nigel Kersten
Product, Puppet Labs
@nigelkersten

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: exporting resources that aren't built-in resources...

2011-06-23 Thread JoE
How well does concat work with exported resources? I'm about to try
the same thing, and I am wondering if you have any tips.

On Jun 22, 3:32 pm, Rich Rauenzahn  wrote:
> On Wed, Jun 22, 2011 at 3:03 PM, Rich Rauenzahn  wrote:
> > We seem to be able to export resources (and import them) just fine if
> > they are basic resources, like nagios_* -- but we don't seem to be
> > able to do it with defines, like @@concat::fragment.
>
> > $ puppet -V
> > 2.6.4
>
> > Is this a bug?  Intended behavior?  Are we doing something wrong?
>
> ugh.  We were only using a single <> not a <<>>.
>
> nevermind
>
> Rich

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Nigel Kersten
On Thu, Jun 23, 2011 at 9:25 AM, Peter Meier  wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
 I am hesitant for us to put something like this in the core distribution
 though, simply because we know it's a maintenance problem over time.
>>>
>>> Fair enough.
>>>
>>> Though I imagine not having this feature will lose puppet some people.
>>
>> Then lets get a simple text patterns module together for people to use.
>
> But be aware that names like appendifnosuchline do not fit the mental
> model that puppet tries to propagate, but are fine for "script oriented"
> configuration management systems such as cfengine or cdist.
>
> Something like:
>
> line{'SftpSubsystem ':
>  file => '/tmp/test',
>  ensure => (present|absent)
> }
>
> fits much more the mental model of puppet. Usually such a statement is a
> quick but dirty way to do things and I try to avoid them as much as
> possible. Therefore, I completely understand and support the concerns of
> Nigel to not include such a feature in the core.

Yep. In a previous job we put together a type called "FileLine" which
I think fits with The Puppet Way™ better.

> But yes it would be good to have a solid module in the forge where
> people can be pointed at.

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

>>> I am hesitant for us to put something like this in the core distribution
>>> though, simply because we know it's a maintenance problem over time.
>>
>> Fair enough.
>>
>> Though I imagine not having this feature will lose puppet some people.
> 
> Then lets get a simple text patterns module together for people to use.

But be aware that names like appendifnosuchline do not fit the mental
model that puppet tries to propagate, but are fine for "script oriented"
configuration management systems such as cfengine or cdist.

Something like:

line{'SftpSubsystem ':
  file => '/tmp/test',
  ensure => (present|absent)
}

fits much more the mental model of puppet. Usually such a statement is a
quick but dirty way to do things and I try to avoid them as much as
possible. Therefore, I completely understand and support the concerns of
Nigel to not include such a feature in the core.

But yes it would be good to have a solid module in the forge where
people can be pointed at.

~pete
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4DaPMACgkQbwltcAfKi3/eegCgkG3wg+FSkHlMx5Ze6um8jw1M
7woAn1sGv7Jc5vMaSmguIE7Yl6NQYx8z
=F+9W
-END PGP SIGNATURE-

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Aaron Grewell
There are at least three ways to do this:
1) Use an Augeas resource to edit the file. For system files this can be a
good solution since Augeas generally has lenses for them.
2) Use an Exec resource and something like sed or cat.  Not my preferred
approach but sometimes the easiest, especially if you already scripted the
task in bash at some point.  The tricky bit is getting the 'unless' portion
working right so it doesn't run every time and just keep adding lines.
3) The 'concat' third-party module allows building a file from arbitrary
chunks of text, which can include a both server-side and client-side
pieces.  I just started using this one but so far it's very cool.  Even if
you don't end up using it this time around it's worth a look in case you
need it later.
https://github.com/ripienaar/puppet-concat

On Thu, Jun 23, 2011 at 3:55 AM, Sans  wrote:

> Dear all,
>
> As in the title, how do I add some extra lines in a existing file and
> check every time for its presence? I just don't want to copy over the
> existing file for some good reason (system files etc.).
>
> Any idea how should I do that? cheers!!
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Puppet 2.6.9 & 2.7.1 packages for Solaris

2011-06-23 Thread Mark Phillips
CSW packages in experimental - 
http://buildfarm.opencsw.org/experimental.html#markp

Both contain Dom Cleal's patched pkgutil[1] provider that supports 'source'[2] 
for -t alternative repositories.

--Mark

[1] 
https://github.com/domcleal/puppet/blob/tickets/master/8011/lib/puppet/provider/package/pkgutil.rb
[2] http://projects.puppetlabs.com/issues/8011

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Nigel Kersten
On Thu, Jun 23, 2011 at 8:06 AM, Nico -telmich- Schottelius
 wrote:
> Nigel Kersten [Thu, Jun 23, 2011 at 07:51:23AM -0700]:
>> nico-puppet-us...@schottelius.org> wrote:
>> [...]
>> I am hesitant for us to put something like this in the core distribution
>> though, simply because we know it's a maintenance problem over time.
>
> Fair enough.
>
> Though I imagine not having this feature will lose puppet some people.

Then lets get a simple text patterns module together for people to use.

>> I'd be much more keen to see us have a good key/value type and provider that
>> is easier to maintain and achieves the same result as "append if no such
>> line".
>
> I agree, this is yet another good type to have [0].
> But it solves a somehow a different job.

Is there any difference between "append if no such line" and a
key/value type that doesn't require a value to be provided?

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: [Puppet-dev] Announce: 2.6.9 Released

2011-06-23 Thread Todd Zullinger
Michael Stahnke wrote:
> This release is a maintenance release of the 2.6.x series of Puppet.
> This will likely be the last release in the 2.6.x series for Puppet,
> now that 2.7 is out.

For those using Fedora or RHEL/CentOS, I've updated the yum repos at:

http://tmz.fedorapeople.org/repo/puppet/

Packages for EL 4 - 6 and Fedora 13 - 15 are available for testing.
Add the puppet.repo file from either the epel or fedora directories to
/etc/yum.repos.d to enable.

If you find problems with the packaging, please let me know.  If you
find other bugs, please file them in redmine:

http://projects.puppetlabs.com/projects/puppet/issues

-- 
ToddOpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~
The policy of the American government is to leave its citizens free,
neither restraining nor aiding them in their pursuits.
-- Thomas Jefferson



pgpahUZCkNB3g.pgp
Description: PGP signature


[Puppet Users] available built-in variables

2011-06-23 Thread Patrick
Is there anywhere that lists the available built-in variables aside
from facter and 
http://docs.puppetlabs.com/guides/faq.html#are-there-variables-available-other-than-those-provided-by-facter
?
I'm referring to variables like $title and $name, which are mentioned
by http://docs.puppetlabs.com/guides/language_guide.html#defined-resource-types,
but are there any others?

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Nico -telmich- Schottelius
Nigel Kersten [Thu, Jun 23, 2011 at 07:51:23AM -0700]:
> nico-puppet-us...@schottelius.org> wrote:
> [...] 
> I am hesitant for us to put something like this in the core distribution
> though, simply because we know it's a maintenance problem over time.

Fair enough.

Though I imagine not having this feature will lose puppet some people.

> I'd be much more keen to see us have a good key/value type and provider that
> is easier to maintain and achieves the same result as "append if no such
> line".

I agree, this is yet another good type to have [0].
But it solves a somehow a different job.

Nico

[0] 
http://www.nico.schottelius.org/software/cdist/man/cdist-type__key_value.html

-- 
PGP key: 7ED9 F7D3 6B10 81D7 0EC5  5C09 D7DC C8E4 3187 7DF0

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Nigel Kersten
On Thu, Jun 23, 2011 at 8:00 AM, Kinzel, David wrote:

>
> I just think having some built-in functions for text patterns would be
> lovely. There are many cases where something like addifnosuchline would
> be perfectly valid. Just because it won't be the solution in all cases
> doesn't mean it should be dismissed.
>
> But perhaps I should shut up and code these sometime.. :>


I'm happy to give help and advice if you do, but if no-one from the
community steps up, I'll convert those simple text patterns to a Forge
Module and a GitHub repo and we can move to a properly collaborative effort.

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



RE: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Kinzel, David
Apoologies for this top posting. Blame Outlook.
 
I don't disagree at all. And for your specific example of sshd_config I
precisely do have a proper pattern for editing text files to set values
as needed (or not). This works extremely well and I am satisfied with
the results. 

I just think having some built-in functions for text patterns would be
lovely. There are many cases where something like addifnosuchline would
be perfectly valid. Just because it won't be the solution in all cases
doesn't mean it should be dismissed.

But perhaps I should shut up and code these sometime.. :>



From: puppet-users@googlegroups.com
[mailto:puppet-users@googlegroups.com] On Behalf Of Nigel Kersten
Sent: Thursday, June 23, 2011 8:38 AM
To: puppet-users@googlegroups.com
Subject: Re: [Puppet Users] How to add extra lines in the
existing files?




On Thu, Jun 23, 2011 at 6:37 AM, Kinzel, David
 wrote:


>> this is not directly built into puppet.
>
>Is there any specific reason why this is not built into
puppet?
>
>We've put __addifnosuchline [0] into cdist [1] as one
of
>the most basic features, because it's often needed if
you do not
>care about the existing contents, but just need to add
a line.
>


I second this. This would greatly cut down on things we
do with exec
patterns. And no, I don't want to use augeas as I
typically see people
fighting with it to work in all their environments.




The problem with appendifnosuchline functionality is that it's
often easy at first, but then becomes difficult to maintain.

Say you want to set:

Subsystem sftp /usr/libexec/sftp-server

in your sshd_config.

It's simple enough at first, but what happens when you want to
change the actual setting? You're no longer able to do this within the
semantics of "append if no such line".

You need to know how the relevant service behaves when you have
two values for a setting in a config file. Does the first one win? the
last? Does it complain and not let you do this?

Or you end up changing the condition to check for to include a
regular expression or do partial line matching, which starts to bring
you closer to the Augeas model anyway.

This is why people like being able to use Augeas. You get to
express this in a more natural manner, along the lines of "set the sftp
subsystem to this value".

It is a little difficult to get going with Augeas, it requires a
shift in mindset, and the syntax is a little obscure, but I feel that
the best option is often to create a defined type that expresses what
you're trying to do in a simple manner, and that defined type wraps an
internal Augeas resource.

If you're set on not using Augeas, then do the same defined type
trick with sed/grep/awk/whatever as the internal resource, but whatever
you do, I do think the "append if no such line" semantics aren't really
maintainable over time. 



-- 
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@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.



This email communication and any files transmitted with it may contain 
confidential and or proprietary information and is provided for the use of the 
intended recipient only.  Any review, retransmission or dissemination of this 
information by anyone other than the intended recipient is prohibited.  If you 
receive this email in error, please contact the sender and delete this 
communication and any copies immediately.  Thank you.
http://www.encana.com

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: Using require and notify across class resources cause a dependency cycle

2011-06-23 Thread Nigel Kersten
On Thu, Jun 23, 2011 at 6:01 AM, jcbollinger wrote:

>
> While I'm on my soapbox, this is one reason why I don't like
> interclass dependencies very much, and why run stages (which magnify
> this problem) need to be approached with caution.  There is certainly
> something to be said for the layer of abstraction achieved by relying
> on interclass dependencies instead of on finer-grained inter-resource
> dependencies, but you can't do it halfway.
>

I agree with the halfway bit :) but generally I feel that class-to-class
relationships are much easier to maintain than resource-to-resource
relationships that cross class boundaries.

It allows you to change the internal relationships and behavior of classes
without worrying so much about external consumers of your class.
Encapsulation is a good thing.

Your modules are significantly less reusable if you need to document
required individual resource relationships.

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Nigel Kersten
On Thu, Jun 23, 2011 at 7:46 AM, Nico -telmich- Schottelius <
nico-puppet-us...@schottelius.org> wrote:

> Nigel,
>
> Nigel Kersten [Thu, Jun 23, 2011 at 07:37:30AM -0700]:
> > [...]
> >
> > It's simple enough at first, [...]
> >
>
> that's exactly the use case for __addifnosuchline in cdist.
> The type let's you do what you want to do right now, fast and
> simple. That's what a feature I've always missed in puppet.
>

So it is really really simple to construct this, and the wiki link on Simple
Text Patterns posted earlier shows how easy it is.

> [...] I do think the "append if no such line" semantics aren't really
> maintainable over
> > time.
>
> If at any time in the future, I begin to add more and more lines
> to the same file, I definitely should refacter and create a type
> that handles managing this important file.
>
> For me it's mostly a "take the right tool for the right job" selection
> here.
>

I understand, and I'd be really happy to see someone take those simple text
patterns and create a module on the Forge for this collection of
functionality so people can get it easily.

I am hesitant for us to put something like this in the core distribution
though, simply because we know it's a maintenance problem over time.

I'd be much more keen to see us have a good key/value type and provider that
is easier to maintain and achieves the same result as "append if no such
line".

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Nico -telmich- Schottelius
Nigel,

Nigel Kersten [Thu, Jun 23, 2011 at 07:37:30AM -0700]:
> [...]
> 
> It's simple enough at first, [...]
> 

that's exactly the use case for __addifnosuchline in cdist.
The type let's you do what you want to do right now, fast and
simple. That's what a feature I've always missed in puppet.

> [...] I do think the "append if no such line" semantics aren't really 
> maintainable over
> time.

If at any time in the future, I begin to add more and more lines
to the same file, I definitely should refacter and create a type
that handles managing this important file.

For me it's mostly a "take the right tool for the right job" selection here.

Cheers,

Nico

-- 
PGP key: 7ED9 F7D3 6B10 81D7 0EC5  5C09 D7DC C8E4 3187 7DF0

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: How to add extra lines in the existing files?

2011-06-23 Thread Sans
I [found and] started looking in the "Augeas" module - but looks like
there are some advantages as well. S, what's the best options (/
suggestions) we have? Basically I wanna add lines in the file like "/
etc/sysctl.conf", "/etc/my.cnf" etc. Cheers!!

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Nigel Kersten
On Thu, Jun 23, 2011 at 6:37 AM, Kinzel, David wrote:

> >> this is not directly built into puppet.
> >
> >Is there any specific reason why this is not built into puppet?
> >
> >We've put __addifnosuchline [0] into cdist [1] as one of
> >the most basic features, because it's often needed if you do not
> >care about the existing contents, but just need to add a line.
> >
>
> I second this. This would greatly cut down on things we do with exec
> patterns. And no, I don't want to use augeas as I typically see people
> fighting with it to work in all their environments.
>
>
The problem with appendifnosuchline functionality is that it's often easy at
first, but then becomes difficult to maintain.

Say you want to set:

Subsystem sftp /usr/libexec/sftp-server

in your sshd_config.

It's simple enough at first, but what happens when you want to change the
actual setting? You're no longer able to do this within the semantics of
"append if no such line".

You need to know how the relevant service behaves when you have two values
for a setting in a config file. Does the first one win? the last? Does it
complain and not let you do this?

Or you end up changing the condition to check for to include a regular
expression or do partial line matching, which starts to bring you closer to
the Augeas model anyway.

This is why people like being able to use Augeas. You get to express this in
a more natural manner, along the lines of "set the sftp subsystem to this
value".

It is a little difficult to get going with Augeas, it requires a shift in
mindset, and the syntax is a little obscure, but I feel that the best option
is often to create a defined type that expresses what you're trying to do in
a simple manner, and that defined type wraps an internal Augeas resource.

If you're set on not using Augeas, then do the same defined type trick with
sed/grep/awk/whatever as the internal resource, but whatever you do, I do
think the "append if no such line" semantics aren't really maintainable over
time.

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Martin Alfke
On 06/23/2011 03:37 PM, Kinzel, David wrote:
>>> this is not directly built into puppet.
>>
>> Is there any specific reason why this is not built into puppet?
>>
>> We've put __addifnosuchline [0] into cdist [1] as one of
>> the most basic features, because it's often needed if you do not
>> care about the existing contents, but just need to add a line.
>>
> 
> I second this. This would greatly cut down on things we do with exec
> patterns. And no, I don't want to use augeas as I typically see people
> fighting with it to work in all their environments.

I know that other config management tools also use things like
"appendifnosuchline".
Personally I do not like this feature. (I do not like augeas either.)

I like having a complete configuration file in my vcs.
In case of review I see all configuration parameters which belong to the
specific configuration file.
This is quite useful since we do reviews on a monthly basis
In case of application upgrades I review the complete config file. I do
not need to check for single lines and whether the syntax has changed.

On the other hand puppet offers you a flexible way to build up features
by yourself:
http://projects.puppetlabs.com/projects/1/wiki/Development_Practical_Types
(This shows how to build up a reusable type for append_if_no_such_line.)

my 5pence.

kind regards,

Martin

> 
>> Cheers,
>>
>> Nico
>>
> 
> This email communication and any files transmitted with it may contain 
> confidential and or proprietary information and is provided for the use of 
> the intended recipient only.  Any review, retransmission or dissemination of 
> this information by anyone other than the intended recipient is prohibited.  
> If you receive this email in error, please contact the sender and delete this 
> communication and any copies immediately.  Thank you.
> http://www.encana.com
> 

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



RE: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Kinzel, David
>> this is not directly built into puppet.
>
>Is there any specific reason why this is not built into puppet?
>
>We've put __addifnosuchline [0] into cdist [1] as one of
>the most basic features, because it's often needed if you do not
>care about the existing contents, but just need to add a line.
>

I second this. This would greatly cut down on things we do with exec
patterns. And no, I don't want to use augeas as I typically see people
fighting with it to work in all their environments.

>Cheers,
>
>Nico
>

This email communication and any files transmitted with it may contain 
confidential and or proprietary information and is provided for the use of the 
intended recipient only.  Any review, retransmission or dissemination of this 
information by anyone other than the intended recipient is prohibited.  If you 
receive this email in error, please contact the sender and delete this 
communication and any copies immediately.  Thank you.
http://www.encana.com

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: How to manage many nodes easily?

2011-06-23 Thread jcbollinger

On Jun 22, 9:35 pm, flex  wrote:
> These is another question, i have many defines which will apply an
> application to sepcified path, called as:
>
> application::add { "app1": path => "/var/app1" }
>
> by this i can apply app1 and app2 in node1, app3 and app4 in node2, etc.
>
> now, how do i switch this to a class? Need i create a seperate class for all
> the apps although the only difference is the path?


I recommend that you package your applications for your nodes' native
packaging system (RPM, apt, etc.), and use Package resources to manage
them.  Creating a local repository for your packages helps make this
approach very smooth.  You still need to put the Package resources
into one or more classes, but you don't need to worry about specifying
a path for each one.

Although creating packages may seem intimidating if you haven't done
it before, it's really not that hard, and you get management benefits
that extend well beyond Puppet.


John

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Nico -telmich- Schottelius
Martin Alfke [Thu, Jun 23, 2011 at 02:51:07PM +0200]:
> On 06/23/2011 12:55 PM, Sans wrote:
> > [...] how do I add some extra lines in a existing file [...]
> 
> this is not directly built into puppet.

Is there any specific reason why this is not built into puppet?

We've put __addifnosuchline [0] into cdist [1] as one of
the most basic features, because it's often needed if you do not
care about the existing contents, but just need to add a line.

Cheers,

Nico

[0] 
http://www.nico.schottelius.org/software/cdist/man/cdist-type__addifnosuchline.html
[1] http://www.nico.schottelius.org/software/cdist/

-- 
PGP key: 7ED9 F7D3 6B10 81D7 0EC5  5C09 D7DC C8E4 3187 7DF0

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Using require and notify across class resources cause a dependency cycle

2011-06-23 Thread jcbollinger


On Jun 22, 4:27 pm, PBWebGuy  wrote:
> I have a simple sample below that illustrates a problem I ran into
> today.  What I am trying do is execute a command only if another
> class, that which is dependent on it's class, triggers the command
> with a notify.  I'm using the refreshonly => true to prevent it from
> running unless something triggers it.  The require is needed because
> other things need to be done in class a before class b.
>
> When I run this code I get the following error message:
>
> err: Could not apply complete catalog: Found dependency cycles in the
> following relationships
>
> Am I doing something wrong?


Yes.  Your scenario does not make sense: if Class['b'] requires
Class['a'], then each resource in Class['b'] requires every resource
in Class['a'], by definition.  Therefore, if any resource in
Class['b'] also has a 'notify' or 'before' relationship with a
resource in Class['a'] then that closes a dependency cycle.  ('Notify'
is 'before' plus a few extra bits.)


> I think my only solution is to move the Exec[a] out of class a but I
> would think that this should work...


That's perhaps the least disruptive solution, but by no means the only
one.  There are all sorts of ways you could refactor your
dependencies.  Among them, you could replace the inter-Class
dependency with the needed inter-resource dependencies, which
evidently are a subset of those implied by your intercalss
dependency.  Dependency cycles often do signal classification
problems, however, and I think that's probably the case here.

While I'm on my soapbox, this is one reason why I don't like
interclass dependencies very much, and why run stages (which magnify
this problem) need to be approached with caution.  There is certainly
something to be said for the layer of abstraction achieved by relying
on interclass dependencies instead of on finer-grained inter-resource
dependencies, but you can't do it halfway.


John

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Martin Alfke
On 06/23/2011 12:55 PM, Sans wrote:
> Dear all,
> 
> As in the title, how do I add some extra lines in a existing file and
> check every time for its presence? I just don't want to copy over the
> existing file for some good reason (system files etc.).
> 
> Any idea how should I do that? cheers!!
> 

Hi,

this is not directly built into puppet.

But: puppet offers you the flexibility to define an exec which does what
you like.

The simple text pattern site shows you an example:
http://projects.puppetlabs.com/projects/1/wiki/Simple_Text_Patterns

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: How to manage many nodes easily?

2011-06-23 Thread Martin Alfke
On 06/23/2011 11:52 AM, flex wrote:
> But i think class is singletons, means when using class you can not get
> more than one copy of the resource, that's the biggest difference
> between class and define.
> 
> Your example give a duplicate definition error in my environment.
> 
> So is this my fault or there another way?

You are right. Using class does not work here. But you can use a define
with parameters and call the define with parameters later on:

define application::add ($appname) {
file { "/var/$appname":
ensure => directory,
}
}

node 'node1' {
application::add { app1: appname => app1 }
application::add { app3: appname => app3 }
}
node 'node2' {
application::add { app2: appname => app2 }
application::add { anyname: appname => app4 }
}

When calling the define you just have to make sure that the give name is
uniq.


> 
> 2011/6/23 Martin Alfke mailto:tux...@gmail.com>>
> 
> 
> 
> On Jun 23, 7:44 am, Martin Alfke  > wrote:
> > On 06/23/2011 04:35 AM, flex wrote:
> >
> > > These is another question, i have many defines which will apply an
> > > application to sepcified path, called as:
> >
> > > application::add { "app1": path => "/var/app1" }
> >
> > > by this i can apply app1 and app2 in node1, app3 and app4 in
> node2, etc.
> >
> > > now, how do i switch this to a class? Need i create a seperate
> class for
> > > all the apps although the only difference is the path?
> >
> > You can make use of parameterized classes:
> >
> > class application::add($appname) {
> > path => '/var/${appname}',
> > ...
> >
> >  }
> >
> > Within your node definition you call the class with desired parameter:
> >
> > node 'node1' {
> > class application::add { appname => 'app1' }
> > class application::add { appname => 'app3' }
> >
> > }
> 
> The mentioned usage of parameterized classes in node definition is
> wrong.
> See:
> 
> http://docs.puppetlabs.com/guides/language_guide.html#parameterised-classes
> 
> node 'node1' {
>class { 'application::app': appname => 'app1' }
>class { 'application::add': appname => 'app3' }
> }
> 
> >
> > Kind regards,
> >
> > Martin
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > > 2011/6/21 Chris Phillips    >>
> >
> > > I would see a principle whereby nodes should not ever be defined
> > > within the manifest code at all. To me the manifests should be
> > > written to be very generic, and then use ENC's to modify their
> > > behaviour at a "user" level. There is still a lot of
> inconsistency
> > > within Puppet as to how device specific data can be obtained
> > > (extlookup is very useful but rides roughshod over other
> > > architectural principles) but I try to stick to keeping all
> > > manifests generic. I write manifests to manage a package, then
> > > create a group in dashboard to relate that function to a
> business
> > > need and then a node into that group.
> >
> > > On 21 June 2011 14:48, Martin Willemsma
> mailto:mwillem...@gmail.com>
> > > >>
> wrote:
> >
> > > We use /etc/puppet/node-definitions/*.pp in site.pp
> similar to
> > > what Carles is saying.
> >
> > > [node-definitions] is a git repo thats being synced on both
> > > puppermasters. This happens on every push to origin
> >
> > > We use the 'default' node which does the baseline
> configuration
> > > based on a 'role'
> >
> > > In a separate file $fqdn.pp I place the definitions for
> a node.
> >
> > > Are there more people using this kind of approach?
> >
> > > ---
> > > Martin
> >
> > > 2011/6/21 Carles Amig�  
> > >  >>
> >
> > > We had the same problem and we just separated each
> node (or
> > > group of nodes) in one file and then we load them
> using the
> > > following syntax:
> >
> > >import "nodes/*.pp"
> >
> > > You could also organize those files in
> subdirectories if you
> > > like so:
> >
> > >import "nodes/*/*.pp"
> >
> > > The only problem we've found with this approach is when
> > > creating new files, puppetmaster takes a while to
> "

[Puppet Users] How to add extra lines in the existing files?

2011-06-23 Thread Sans
Dear all,

As in the title, how do I add some extra lines in a existing file and
check every time for its presence? I just don't want to copy over the
existing file for some good reason (system files etc.).

Any idea how should I do that? cheers!!

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Puppet module layout

2011-06-23 Thread Bruce Bushby
Thanks Nigel, appreciate the heads up!

I'm finding that puppet module are great when you want a module for
"ssh" or a module for "sudoers"  ...but I can't find an example where
there is a module called "os" which contains "ssh.pp" ,
"prod_sudoers.pp" , "dev_sudoers.pp" , "userauth.pp",
"iptables.pp" etc

Then /etc/puppet/manifest/site.pp would include the module "os"

and then /etc/puppet/modules/os/manifest/init.pp  would include the
various "pp" components for various hosts lists.

Is this even possible?




On Jun 20, 5:50 pm, Nigel Kersten  wrote:
> On Sat, Jun 18, 2011 at 1:29 AM, Bruce Bushby wrote:
>
>
>
>
>
>
>
>
>
> > Hello
>
> > I'm new to large scale puppet deployment and was hoping the list could
> > offer some pointers on "module layout"
>
> > My initial "layout" was motivated by a need to "harden" our Linux
> > systems. I grouped the various hardening configs into:
>
> > Kernel
> > OS
> > Network
> > Shell
> > Files
> > Application
>
> > I'm hoping I can create the same module structure within puppet.
>
> In my experience, these module categories are too broad and it will make
> maintenance difficult.
>
> You don't want to get too fine-grained with your modules, but if you keep
> things this broad, you'll end up having lots of complicated relationships
> like Class[os::foo] -> Class[files::foo]
>
> I made this mistake on a large deployment and regretted it.

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Re: How to manage many nodes easily?

2011-06-23 Thread flex
But i think class is singletons, means when using class you can not get more
than one copy of the resource, that's the biggest difference between class
and define.

Your example give a duplicate definition error in my environment.

So is this my fault or there another way?

2011/6/23 Martin Alfke 

>
>
> On Jun 23, 7:44 am, Martin Alfke  wrote:
> > On 06/23/2011 04:35 AM, flex wrote:
> >
> > > These is another question, i have many defines which will apply an
> > > application to sepcified path, called as:
> >
> > > application::add { "app1": path => "/var/app1" }
> >
> > > by this i can apply app1 and app2 in node1, app3 and app4 in node2,
> etc.
> >
> > > now, how do i switch this to a class? Need i create a seperate class
> for
> > > all the apps although the only difference is the path?
> >
> > You can make use of parameterized classes:
> >
> > class application::add($appname) {
> > path => '/var/${appname}',
> > ...
> >
> >  }
> >
> > Within your node definition you call the class with desired parameter:
> >
> > node 'node1' {
> > class application::add { appname => 'app1' }
> > class application::add { appname => 'app3' }
> >
> > }
>
> The mentioned usage of parameterized classes in node definition is
> wrong.
> See:
> http://docs.puppetlabs.com/guides/language_guide.html#parameterised-classes
>
> node 'node1' {
>class { 'application::app': appname => 'app1' }
> class { 'application::add': appname => 'app3' }
> }
>
> >
> > Kind regards,
> >
> > Martin
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > > 2011/6/21 Chris Phillips  ch...@untrepid.com>>
> >
> > > I would see a principle whereby nodes should not ever be defined
> > > within the manifest code at all. To me the manifests should be
> > > written to be very generic, and then use ENC's to modify their
> > > behaviour at a "user" level. There is still a lot of inconsistency
> > > within Puppet as to how device specific data can be obtained
> > > (extlookup is very useful but rides roughshod over other
> > > architectural principles) but I try to stick to keeping all
> > > manifests generic. I write manifests to manage a package, then
> > > create a group in dashboard to relate that function to a business
> > > need and then a node into that group.
> >
> > > On 21 June 2011 14:48, Martin Willemsma  > > > wrote:
> >
> > > We use /etc/puppet/node-definitions/*.pp in site.pp similar to
> > > what Carles is saying.
> >
> > > [node-definitions] is a git repo thats being synced on both
> > > puppermasters. This happens on every push to origin
> >
> > > We use the 'default' node which does the baseline configuration
> > > based on a 'role'
> >
> > > In a separate file $fqdn.pp I place the definitions for a node.
> >
> > > Are there more people using this kind of approach?
> >
> > > ---
> > > Martin
> >
> > > 2011/6/21 Carles Amig�  > > >
> >
> > > We had the same problem and we just separated each node (or
> > > group of nodes) in one file and then we load them using the
> > > following syntax:
> >
> > >import "nodes/*.pp"
> >
> > > You could also organize those files in subdirectories if
> you
> > > like so:
> >
> > >import "nodes/*/*.pp"
> >
> > > The only problem we've found with this approach is when
> > > creating new files, puppetmaster takes a while to "see"
> them.
> >
> > > El 20/06/2011 5:25, flex escribi�:
> >
> > > We have many modules and many nodes, every node may use
> > > different
> > > module, so it's very unpleasant to modify the nodes.pp
> > > Then i saw the external node, but seems it only support
> > > class and we
> > > have many defines called in node.pp
> >
> > > So here is my question: Is there another way for us to
> > > manage so many
> > > nodes easily or should i change all the defines to
> > > classes and using
> > > external nodes?
> >
> > > --
> > > 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@googlegroups.com
> > > .
> > > To unsubscribe from this group, send email to
> > > puppet-users+unsubscribe@__googlegroups.com
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/__group/puppet-users?hl=en
> > >