Re: [Puppet Users] Re: How do I set global noop?

2013-07-29 Thread Sam Morrison
Thanks Justin,

Yes MCollective would be great, just have to find the time.

Rene: I have gone with your solution at the moment. I still think it's a 
bug that doing it on the Resource resource doesn't work, hopefully someone 
will look into those bugs.

Cheers,
Sam




On Sunday, 28 July 2013 02:11:25 UTC+10, Justin Brown wrote:

 Sam, 

 You should setup MCollective. You can implement a simple plugin that 
 changes the global noop setting in puppet.conf and restarts the 
 daemon. 

 That will give you the best scalability, and you have fine-grained 
 control in MCollective on which hosts run using metadata in your 
 Puppet classes and facts. 

 Regards, 
 Justin 

 On Sat, Jul 27, 2013 at 10:52 AM, rvlinden 
 rene.vand...@gmail.com javascript: wrote: 
  Sam, 
  
  You could make some changes to you site.pp and set some defaults like 
 this 
  
  Exec { 
schedule = $::globalvars_schedule, 
noop = $::globalvars_noop, 
  } 
  File { 
schedule = $::globalvars_schedule, 
noop = $::globalvars_noop, 
  } 
  Group { 
schedule = $::globalvars_schedule, 
noop = $::globalvars_noop, 
  } 
  Mount { 
schedule = $::globalvars_schedule, 
noop = $::globalvars_noop, 
  } 
  Package { 
schedule = $::globalvars_schedule, 
noop = $::globalvars_noop, 
  } 
  Service { 
schedule = $::globalvars_schedule, 
noop = $::globalvars_noop, 
  } 
  User { 
schedule = $::globalvars_schedule, 
noop = $::globalvars_noop, 
  } 
  
  . and more . 
  
  
  
  Make sure that all puppet types you use within you modules are covered 
 in 
  the site.pp and have the noop = $::globalvars_noop added. 
  
  The final step is to set the topscope variable 'globalvars_noop' 
 somewhere 
  (for example hiera, or Puppet console) and your node will be run with 
 noop. 
  No need to touch any puppet config on the clients, and very easy to 
 manage 
  :-) 
  
  Regards, 
  Rene vd Linden 
  Blog: https://www.rvanderlinden.net/wordpress 
  
  
  On Tuesday, July 23, 2013 1:29:24 AM UTC+2, Sam Morrison wrote: 
  
  I'm trying to set a global noop but it doesn't seem possible, 
  
  There are 2 bugs open about this which to me look pretty serious as the 
  expected behaviour isn't the case. 
  
  http://projects.puppetlabs.com/issues/21286 
  http://projects.puppetlabs.com/issues/6549 
  
  If anyone has a work around (that doesn't include modifying puppet.conf 
  file) I would be very interested. 
  
  Cheers, 
  Sam 
  
  
  -- 
  You received this message because you are subscribed to the Google 
 Groups 
  Puppet Users group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to puppet-users...@googlegroups.com javascript:. 
  To post to this group, send email to 
  puppet...@googlegroups.comjavascript:. 

  Visit this group at http://groups.google.com/group/puppet-users. 
  For more options, visit https://groups.google.com/groups/opt_out. 
  
  


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] a different ssh::auth problem

2013-07-29 Thread Joseph Mwesigwa Bbaale
Hi,

I am very new to puppet.

I installed puppet 3.2.3 (open source) on Debian Wheezy. Everything seems 
to work fine.

Now I want to setup ssh::auth on the puppet master. The documentation 
states that:

To install ssh::auth, place the file 
auth.pphttp://projects.reductivelabs.com/attachments/935/auth.pp (attached 
to this page) into the ssh/manifests directory in your module path: for 
example, /etc/puppet/modules/ssh/manifests/auth.pp.


Unfortunately my system does not have ssh/manifest and therefore I wonder, 
I this a minor issue? If not, how do I go about setting up ssh:auth in this 
environment?

Any help offered is highly appreciated.

Joseph

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] dashboard displaying \n in report output

2013-07-29 Thread John Naggets
Hello,

I installed the puppet dasboard 1.2.23 on my puppet master and everything 
works so far fine but I noticed that my reports (URL: /reports/X, where X 
is a report number) displays many new line characters (\n) in its output. 
It looks like the newline char does not get stripped off correctly. Any 
ideas what could be the cause?

Thanks and regards,
John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Puppet master concurrency

2013-07-29 Thread Jonathan Gazeley
We've got quite a few puppet nodes now (50-60, and increasing), and some 
have quite large catalogues. I've noticed that sometimes too many nodes 
attempt to check in at once that their puppet runs will time out or fail 
for other reasons.


Certainly if I kick off all nodes simultaneously using clusterssh then 
they will all fail.


The load average on the Puppetmaster is 1 and it has plenty of memory. 
The server that provides PuppetDB has a very low load average too and 
does not appear to be limited by resources, however we have no 
visibility of the Postgres backend, which is run by a different team who 
do not expose their monitoring.


I'd like to know how to increase the number of simultaneous runs the 
puppetmaster can handle because as we keep increasing the number of 
nodes in our network we wil surely run into problems.


Cheers,
Jonathan

--
You received this message because you are subscribed to the Google Groups Puppet 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Latest Puppet Enterprise + Debian Lenny nodes?

2013-07-29 Thread Marco Cancedda
Hi there,

Would it be possible to run Puppet Enterprise and manage nodes based on 
Debian Lenny? 

I know the OS is end of life and not supported by Puppet (as in the 
company) and of course I don't expect any support.

Would it still be possible to use it, even with a limited set of 
capabilities like deploying users, restarting services maybe?

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet master concurrency

2013-07-29 Thread Matthew Burgess
On 29 July 2013 11:52, Jonathan Gazeley jonathan.gaze...@bristol.ac.ukwrote:


 I'd like to know how to increase the number of simultaneous runs the
 puppetmaster can handle because as we keep increasing the number of nodes
 in our network we wil surely run into problems.


Hi Jonathan,

If you're not already running your puppetmaster behind Apache/Passenger
then that would be my initial recommendation.  Webrick, puppet's default
http server, can only handle 1 agent checkin at a time and is usually the
1st culprit in scaling issues.  Although it's always worth ensuring
PuppetDB/Postgres are operating efficiently, my understanding is that
Puppet - PuppetDB communications are asynchronous, so even if they do take
a long time, it shouldn't be affecting your master - agent interactions.

Kind Regards,

Matt.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet master concurrency

2013-07-29 Thread Jonathan Gazeley

On 29/07/13 12:20, Matthew Burgess wrote:
On 29 July 2013 11:52, Jonathan Gazeley 
jonathan.gaze...@bristol.ac.uk 
mailto:jonathan.gaze...@bristol.ac.uk wrote:



I'd like to know how to increase the number of simultaneous runs
the puppetmaster can handle because as we keep increasing the
number of nodes in our network we wil surely run into problems.


Hi Jonathan,

If you're not already running your puppetmaster behind 
Apache/Passenger then that would be my initial recommendation.  
Webrick, puppet's default http server, can only handle 1 agent checkin 
at a time and is usually the 1st culprit in scaling issues.  Although 
it's always worth ensuring PuppetDB/Postgres are operating 
efficiently, my understanding is that Puppet - PuppetDB 
communications are asynchronous, so even if they do take a long time, 
it shouldn't be affecting your master - agent interactions.


Kind Regards,

Matt.


Hi Matt,

Thanks for your response. We are indeed running puppetmaster behind 
Apache/Passenger. We can handle more than one agent checkin at once, but 
triggering more than a few simultaneously will usually result in 
timeouts or spurious errors such as the agents claiming that one of 
their classes does not exist.


Thanks,
Jonathan

--
You received this message because you are subscribed to the Google Groups Puppet 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Resolving duplicated resources

2013-07-29 Thread jcbollinger


On Monday, July 22, 2013 1:29:43 AM UTC-5, Adam C wrote:

 Thanks for the response Paul, I took a look at ensure_packages and it 
 seems useful, but it of course has the same drawback as using defined, in 
 that it'll only work if all modules use it.

 I've reduced my problem to the following. I created two modules, module1 
 and module2 as follows:

 *modules/**module1/manifests/init.pp*:

 define module1::before { package { 'mod_ssl': ensure = present } }

 *modules/**module2/manifests/init.pp*:

 define module2::after { if ! defined(Package['mod_ssl']) { package { 
 'mod_ssl': ensure = present } } } 

 and in my main manifest, I have the following which works:

 module1::before {'test': } 
 module2::after {'test': } 

 but if I change around the order, I receive an error:

 module2::after {'test': } 
 module1::before {'test': } 

 Error: Duplicate declaration: Package[mod_ssl] is already declared in file 
 /tmp/vagrant-puppet/modules-0/mod2/manifests/init.pp at line 7; cannot 
 redeclare on node vagrant

 of course this happens because module 2 performs a check to only require 
 the mod_ssl package if it isn't defined, but module 1 has no such check, so 
 if module 1 is included after module 2, it ends up duplicating the mod_ssl 
 resource.

 I've tried resolving this by using the *require* directive, but it 
 doesn't seem to work:

 module2::after {'test': require = Module1::Before['test'] } 
 module1::before {'test': }

 Can anyone tell me how I can fix this, and have the code in module1 
 included before module2, regardless of the order they appear in the file?  
 I thought that's what the *require *directive would enforce, but I must 
 be using it incorrectly, since it doesn't seem to work for me in this 
 instance.  if I can solve this small issue, I can fix my larger problem 
 without needing to modify the code in either module, which is what I'd 
 prefer.  Thanks for any help


There is no solution to the problem as you have framed it.  Resource 
declarations, including for resources of defined types, are parsed in the 
order in which they are encountered in Puppet's linear traversal of the 
manifest file in which they appear.  Similarly, classes are 'include'd in 
the order they appear in the file, modulo a few caveats related to classes 
that are declared in multiple files or via an ENC.  The 'require' 
metaparameter and its compatriots affect the relative order in which those 
resources and classes are applied to the client, which is an entirely 
separate question.

If you want one resource module1::before to be parsed before resource 
module2::after when they are both declared by the same class, then the 
declaration of the former must precede the declaration of the latter.  
Inasmuch as that is easy to accomplish, it it not the usual problem in this 
area.  Instead, the problem is usually about controlling the relative order 
in which declarations appearing in different classes are parsed, which 
ultimately comes down to controlling the order in which classes are parsed.

A requirement of that kind is often described as a parse-order 
dependency, and it constitutes a serious problem in your manifests.  You 
will find a lot of discussion of parse-order issues in the archives of this 
group.  The best solution would be to solve the dependency, and the best 
way to do that is to factor the duplicate resource declaration out into a 
separate class, which each dependent then declares via an 'include' 
statement.  The class may be broader than just one resource, as seems 
appropriate to you.  Example:

class ssl {
  package { 'mod_ssl': ensure = present }
}

define module1::foo {
  include 'ssl'
  # other stuff ...
}

define module2::bar {
  include 'ssl'
  # other stuff ...
}

This solves the problem because classes are singletons, so declaring the 
same class multiple times is safe and idempotent(*).

(*) There is a caveat, however.  Binding data or metaparameters to a class 
via a parameterized-style class declaration (e.g. class { 'ssl': stage = 
'main' }, or even class { 'httpd': }) is *not* idempotent.  Such a 
declaration of a given class must be the first declaration of that class 
parsed, thus making it another parse-order dependency.  In Puppet 3 you can 
use hiera data bindings to avoid that issue.  You can also use direct hiera 
calls in the class body instead of class parameters.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Vmware Provisioning after upgrade to Puppet Enterprise 3.0.0

2013-07-29 Thread Alexander Golovin
Hello community, 

I've upgraded my puppet enterprise from 2.7 to 3 version:

#puppet --version
3.2.2 (Puppet Enterprise 3.0.0)

After that I've got some problems with vmware provisioning, this error when 
trying create a new vm from template:

#puppet node_vmware create --vmname=mynewvm --template=/Datacenters/Center 
One, VM/vm/TEMPLATES/RHEL6

Error: Could not find VM at /Datacenters/Center One, VM/vm/TEMPLATES/RHEL6
Error: Try 'puppet help node_vmware create' for usage

It has worked well at 2.7 version instead I had to use name instead vmname 
as in 3 version.

Do you have a same errors at new version, or just syntax changed and I need 
to change my vm deploy command now?

Thank You.




-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: puppet ignoring dependencies

2013-07-29 Thread jcbollinger


On Monday, July 22, 2013 11:10:53 AM UTC-5, cko wrote:

 hi everyone,

 my *site.pp* looks like this:


 node server.my.fqdn { 
class { puppet_agent: } 
class {base_config:
  require=Class[puppet_agent]
  }
 }

 im trying to achieve that the puppet_agent module is applied before the 
 base config modules. 

 however, the puppet_agent module gets installed LAST.

 any ideas?



Yes.  You are probably mistaken about the order in which the classes 
themselves are applied.  Instead, you almost certainly have a containment 
problem.  The symptom you would have noticed is that one or more classes 
(but not any resources) declared by class 'puppet_agent' are applied after 
one or more classes (but not any resources) declared by class base_config.  
In brief, if you search the archives of this group for containment and 
anchor pattern (the latter being the usual solution) then you should find 
lots of relevant information.

If you remain uncertain about whether yours is a containment problem, then 
post your classes and the output from which you concluded that ordering was 
not working correctly.

Also, relationships work the same for all classes, including module-level 
classes such as yours.  Run stages would be a rather heavy-handed solution 
to your problem, and they sometimes cause more problems than they solve.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Perform action when exported resources change

2013-07-29 Thread jcbollinger


On Tuesday, July 23, 2013 4:30:45 AM UTC-5, Klavs Klavsen wrote:



 Den mandag den 22. juli 2013 08.58.32 UTC+2 skrev George Brown:

 Hi Sneha,

 This is for a GPFS (IBM parallel file system) cluster. When a new client 
 is added it needs to be added by an node that is already part of the 
 cluster. I'm trying to automate this through puppet

 E.g. node80 has just been provisioned

 After installing the client packages I need to add the node from a server 
 already in the cluster by running the following two commands

 mmaddnode -N node80
 mmchlicense client --accept -N node80

 Obviously I only want to have this exec run when a new host is added but 
 I also only want it to execute for the newly added host (I don’t want it to 
 run though nodes01-79 also).


 Perhaps you could do an @@exec.. with a creates.. question is where it 
 actually runs the creates check (I'd assume it to be run where it is 
 collected).
 That only depends on the commands above, actually creating a file 
 somewhere, so you can check for the existence of that file. Otherwise you 
 could do an unless instead (a bit more expensive and troublesome though) 



A 'creates' check is performed on the target node to which the Exec is 
applied, regardless of how that resource ended up in the node's catalog.  
For an exported resource, the parameter value is determined by the node 
that declares the resource, not the one that collects it (if they differ); 
the collecting node gets it as a literal string.  Therefore, if there were 
a characteristic file created by the Exec for each node added to the 
cluster -- and that file was expected to be retained indefinately -- then a 
'creates' parameter would be an appropriate way to model the system.  
Ideally, the new node would stop declaring the Exec once it was added.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Large puppet file in /tmp directory

2013-07-29 Thread Mark Hatch
I saw that one of my managed nodes has a 41 GB file in the /tmp 
directory.  It's filename is puppet20130725-63530-1ylx5vy.  Any idea what 
is causing such a large file to be created?

Thanks.
Mark

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Array use as loop-type construct?

2013-07-29 Thread jcbollinger


On Tuesday, July 23, 2013 12:32:43 PM UTC-5, Bret Wortman wrote:

 I'm trying to use a puppet manifest to set up a series of backup jobs on 
 servers which are each running a variety of mysql databases. My manifest 
 currently looks something like this, which almost works:

 class backups () {

 Cron {
 ensure = present,
 user = root,
 }

 $remote_dest = ['zx2:/data/src/backups','zx3:/data/backups']

 if $hostname == www {
 $databases = ['phpbb3','wikidb','rt4','wordpress']
 $bkp_dest = /data/backup
 elsif...
 :
 }

 cron { $databses:
 command = mysqldump --user admin $databases | gzip  
 mysql-$databases-`date +%Y%m%d`.gz,
 hour = 1,
 minute = 20,
 }

 cron { $remote_dest:
 command = rsync -arzv $bkp_dest $remote_dest,
 hour = 4,
 minute = 40,
 }
 }

 I get the right number of cron jobs built, but when the array variables 
 are quoted, I get the contents all concatenated together.



Yes, that is what you get when you convert an array to a string.

 

 What I'd like is to simulate a for x in array kind of construct. Is that 
 possible using puppet? I'd rather not have to build this and specify each 
 job by hand, which seems really clunky given the elegance of the tool. I'm 
 sure I'm just not seeing something.



There is the template approach you discovered, when it is applicable.  The 
more general approach is to use a defined type in conjunction with Puppet's 
shorthand for declaring multiple resources based on an array of their 
titles.  You're example code is heading in the right direction.  Here's how 
a working version might look:

define backups::database () {
  cron { backup_database_${title}:
ensure  = present,
user= root,
command = mysqldump --user admin ${title} | gzip  
mysql-${title}-`date +%Y%m%d`.gz,
hour= 4,
minute  = 40,
  }
}

define backups::remote () {
  cron { backup_remote_dest_${title}:
ensure  = present,
user= root,
command = rsync -arzv ${backups::bkp_dest} ${title},
hour= 1,
minute  = 20,
  }
}

class backups {
  # ...
  # Set variables, including $databases, $bkp_dest, and $remote_dest
  # ...

  backups::database { $databases: }
  backups::remote { $remote_dest: }
}

Note the use of the automatic $title variable inside the definitions to 
refer to the title of the defined type instance.  You can declare other 
parameters to the definition, too, but as used in the example, all 
instances would get the same values for those parameters.  There are ways 
to be cleverer about that sort of thing, once you have a hold of what's 
going on.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: dashboard displaying \n in report output

2013-07-29 Thread Ellison Marks
According to this thread:

https://groups.google.com/forum/#!searchin/puppet-users/dashboard$20newline$20characters/puppet-users/u_Ul0wqRYxw/er8IuEompFoJ

it was a problem with ruby 1.9.3. YMMV.

On Monday, July 29, 2013 3:23:24 AM UTC-7, John Naggets wrote:

 Hello,

 I installed the puppet dasboard 1.2.23 on my puppet master and everything 
 works so far fine but I noticed that my reports (URL: /reports/X, where X 
 is a report number) displays many new line characters (\n) in its output. 
 It looks like the newline char does not get stripped off correctly. Any 
 ideas what could be the cause?

 Thanks and regards,
 John


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] updating package and all dependency updates with puppet

2013-07-29 Thread jcbollinger


On Wednesday, July 24, 2013 6:40:17 PM UTC-5, Brian Mathis wrote:

 I have not tested that myself, so I'm not sure what Puppet would do in 
 this case.  I'm pretty sure yum would also install the updates, but only if 
 the main (rpm/deb) package specifically requires the newer version.

 Given the original poster's request, it can be assumed that the package 
 does not have the updated version number as part of the package definition, 
 so it needs to be managed separately by Puppet.  I don't think its uncommon 
 to see a package that requires (e.g.) version 5.4, and not get so 
 specific as 5.4.3.


Indeed.  This is a packaging / yum issue, not a Puppet issue.  Exactly the 
same behavior would be observed running yum manually from the command 
line.  In fact, yum has no way to express the idea of updating a package 
and all its dependencies, but not anything else (except by explicitly 
naming all the packages wanting upgraded).

If you care about specific versions of particular packages then you need to 
manage those packages explicitly, whether via Puppet or directly via Yum.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: a different ssh::auth problem

2013-07-29 Thread Stephen Brown II
Greetings,

I'm also new to puppet, but the documentation is basically informing you 
about the way puppet modules are laid out. From the Puppet documentation (
http://docs.puppetlabs.com/puppet/3/reference/modules_fundamentals.html):
On disk, a module is simply a directory tree with a specific, predictable 
structure:

MODULE NAME
|--manifests
|--files
|--templates
|--lib
|--tests
\--spec1

So it is perfectly fine for you to create the ssh/manifests directory and 
place the auth.pp file in there. That's where Puppet expects it to be.

I'd recommend going through the Puppet reference to get more information on 
it, and possbly trying out the Learning Puppet VM Tutorial (
http://docs.puppetlabs.com/learning/), which also has a section on Modules 
and Classes (http://docs.puppetlabs.com/learning/modules1.html)

Hope this helps!
Stephen

On Monday, July 29, 2013 4:12:48 AM UTC-4, Joseph Mwesigwa Bbaale wrote:

 Hi,

 I am very new to puppet.

 I installed puppet 3.2.3 (open source) on Debian Wheezy. Everything seems 
 to work fine.

 Now I want to setup ssh::auth on the puppet master. The documentation 
 states that:

 To install ssh::auth, place the file 
 auth.pphttp://projects.reductivelabs.com/attachments/935/auth.pp (attached 
 to this page) into the ssh/manifests directory in your module path: for 
 example, /etc/puppet/modules/ssh/manifests/auth.pp.


 Unfortunately my system does not have ssh/manifest and therefore I 
 wonder, I this a minor issue? If not, how do I go about setting up ssh:auth 
 in this environment?

 Any help offered is highly appreciated.

 Joseph



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Puppet, Yum, Cassandra, openjdk and --nodeps

2013-07-29 Thread jcbollinger


On Wednesday, July 24, 2013 4:29:44 PM UTC-5, Paul Pham wrote:

 Hello, puppet n00b here.

 Trying to install cassandra via puppet. Works great, only caveat is 
 cassandra (dsc12 package) lists openjdk as a dependency. Ironically enough, 
 the datastax guys themselves recommend using Oracle JRE instead of openjdk, 
 and there is even a 
 bughttps://bugzilla.redhat.com/show_bug.cgi?id=907485that prevents 
 cassandra from starting if it's using openjdk. Anyway, I 
 fixed it by adding an exec to my puppet-java module that sets the Oracle 
 JRE runtime as the defaults via alternatives, and it works fine. However, I 
 still end up with two different java runtimes installed which I find to be 
 a bit unclean.

 The root of the problem to me, though, is that by having puppet install 
 dsc12, I lose visibility into what all those dependencies were that got 
 installed along with it (I didn't realize openjdk was even installing until 
 I started investigating why cassandra wasn't starting). So what I'd prefer 
 to do is add each individual package dependency into my cassandra module 
 itself, thereby explicitly installing only what I intend to install, and 
 nothing else.

 The only way this works, though, is if I can somehow pass the --nodeps 
 option into yum during puppet apply time. Otherwise, regardless of whether 
 I already installed Oracle JRE, using yum to install dsc12 will 
 automatically install openjdk.



 How have you guys handled scenarios like this? I tried searching through 
 the topics here for yum nodeps but it seems people found different ways 
 of solving their individual problems rather than sending flags to the yum 
 provider itself. I also noticed this puppet feature 
 requesthttps://projects.puppetlabs.com/issues/4976which unfortunately has 
 remained open(?) for 3 years. I've also seen people 
 suggest that nodeps should never be used with yum since the purpose of yum 
 is to handle dependencies... but we also like some of the other features of 
 yum, like being able to pull packages down by name automatically from our 
 yum repo (which we manage in-house).

 Anyway, any insights would be great! Thanks,



The best solution to the immediate problem would be to rebuild the RPM to 
correct the dependency information.  There are even tools available by 
which you could edit your existing RPM without rebuilding it from scratch.

As far as --nodeps goes, I am not aware that yum implements it, or anything 
similar.  I find explicit documentation to the contrary, in fact.  If you 
want to go that direction (very unwise) then you need to use rpm directly.

If you use rpm directly, however, (including by explicitly telling Puppet 
to use the 'rpm' Package provider) then you probably still don't want 
--nodeps.  Instead, you want rpm to fail when a package's dependencies are 
not satisfied, so that you can fix the problem.  This is the route to take 
if you want to explicitly specify every package and avoid any others being 
installed.  You do not then get automatic package downloads, but rpm 
understands http: URLs, so you can still pull packages from your local 
repository (or external ones) by specifying their complete URLs.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: including classes

2013-07-29 Thread jcbollinger


On Thursday, July 25, 2013 2:14:17 AM UTC-5, foom...@gmail.com wrote:


 I've been rewriting our modules as and when to the more fashionable 
 parameterised structure.



Why?  If your modules already do everything you want them to do, then 
switching to parameterized-style declarations has no upside, but (as you 
discovered) significant downside.  Especially for classes that aren't 
parameterized in the first place.  Even if you choose to parameterize your 
classes, you are best off relying on automated data binding via Hiera and 
avoiding parameterized-style class declarations in your manifests.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Heria, Facts, and Puppet

2013-07-29 Thread jcbollinger


On Thursday, July 25, 2013 9:27:26 AM UTC-5, chengkai liang wrote:

 So something doesn't look right for me when running puppet apply -e 
 'include ...' for looking heria via facter fact.

 I have hiera configure as this,

 :backends:
 - yaml

 :hierarchy:
 - common 
 - '%{env_name}'

 :yaml:
 :datadir: /var/lib/hiera/data

 and, a file envXX.yaml store in the datadir, and I can run *hiera xyz 
 env_name=envXX* to get the the value of abc associate with xyz.

 Yet, if I export the value variable env_name by *export 
 FACTER_env_name=*envXX, 
 and run:

 *puppet apply -e 'include my_module

 *
 puppet will complaint that it can't find data store in envXX.yaml.



That is a mischaracterization.  Puppet does not say anything of the sort -- 
it's only your interpretation.

 

   From the debug output,

 debug: importing 
 '/Users/cliang/.puppet/modules/puppet_flux2_config/manifests/init.pp' in 
 environment production
 debug: Automatically imported puppet_flux2_config from puppet_flux2_config 
 into production
 debug: hiera(): Hiera YAML backend starting
 debug: hiera(): Looking up host_header_url in YAML backend
 debug: hiera(): Looking for data source common
 Could not find data item host_header_url in any Hiera data file and no 
 default supplied at 
 /Users/cliang/.puppet/modules/puppet_flux2_config/manifests/init.pp:4 on 
 node m-mba.local

 It seems that it stop looking right after common, while running with *hiera 
 xyz env_name=envXX* *--debug *shows,

 DEBUG: Thu Jul 25 07:24:48 -0700 2013: Hiera YAML backend starting
 DEBUG: Thu Jul 25 07:24:48 -0700 2013: Looking up host_header_url in YAML 
 backend
 DEBUG: Thu Jul 25 07:24:48 -0700 2013: Looking for data source common
 DEBUG: Thu Jul 25 07:24:48 -0700 2013: Looking for data source *envXX*
 DEBUG: Thu Jul 25 07:24:48 -0700 2013: Found xyz in *envXX*

 So why puppet apply won't look further into envXX.yaml file?  Anybody can 
 help on this?



Very likely, Puppet does not receive the env_name fact from Facter, causing 
hiera to look for a file named '.yaml' instead of 'envXX.yaml'  That would 
not surprise me much, as it is in no way safe to assume that Puppet will 
provide the same environment it receives to other components and programs 
(such as Facter).  That is not an issue when you query hiera directly, 
because you give the correct value of env_name.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Array use as loop-type construct?

2013-07-29 Thread Bret Wortman
Oh. I've never really grokked the defined type stuff. I can see now I
need to dig in and make sense of it.

Thanks, John!


*
*
*Bret Wortman*
http://damascusgrp.com/
http://damascusgrp.com/ http://bretwortman.com/
http://about.me/wortmanbret


On Mon, Jul 29, 2013 at 1:19 PM, jcbollinger john.bollin...@stjude.orgwrote:



 On Tuesday, July 23, 2013 12:32:43 PM UTC-5, Bret Wortman wrote:

 I'm trying to use a puppet manifest to set up a series of backup jobs on
 servers which are each running a variety of mysql databases. My manifest
 currently looks something like this, which almost works:

 class backups () {

 Cron {
 ensure = present,
 user = root,
 }

 $remote_dest = ['zx2:/data/src/backups','zx3:**/data/backups']

 if $hostname == www {
 $databases = ['phpbb3','wikidb','rt4','**wordpress']
 $bkp_dest = /data/backup
 elsif...
 :
 }

 cron { $databses:
 command = mysqldump --user admin $databases | gzip 
 mysql-$databases-`date +%Y%m%d`.gz,
 hour = 1,
 minute = 20,
 }

 cron { $remote_dest:
 command = rsync -arzv $bkp_dest $remote_dest,
 hour = 4,
 minute = 40,
 }
 }

 I get the right number of cron jobs built, but when the array variables
 are quoted, I get the contents all concatenated together.



 Yes, that is what you get when you convert an array to a string.



 What I'd like is to simulate a for x in array kind of construct. Is
 that possible using puppet? I'd rather not have to build this and specify
 each job by hand, which seems really clunky given the elegance of the tool.
 I'm sure I'm just not seeing something.



 There is the template approach you discovered, when it is applicable.  The
 more general approach is to use a defined type in conjunction with Puppet's
 shorthand for declaring multiple resources based on an array of their
 titles.  You're example code is heading in the right direction.  Here's how
 a working version might look:

 define backups::database () {
   cron { backup_database_${title}:

 ensure  = present,
 user= root,
 command = mysqldump --user admin ${title} | gzip 
 mysql-${title}-`date +%Y%m%d`.gz,
 hour= 4,
 minute  = 40,
   }
 }

 define backups::remote () {
   cron { backup_remote_dest_${title}:

 ensure  = present,
 user= root,
 command = rsync -arzv ${backups::bkp_dest} ${title},
 hour= 1,
 minute  = 20,
   }
 }

 class backups {
   # ...
   # Set variables, including $databases, $bkp_dest, and $remote_dest
   # ...

   backups::database { $databases: }
   backups::remote { $remote_dest: }
 }

 Note the use of the automatic $title variable inside the definitions to
 refer to the title of the defined type instance.  You can declare other
 parameters to the definition, too, but as used in the example, all
 instances would get the same values for those parameters.  There are ways
 to be cleverer about that sort of thing, once you have a hold of what's
 going on.


 John

  --
 You received this message because you are subscribed to a topic in the
 Google Groups Puppet Users group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/puppet-users/rm1wx3s4ZiE/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 puppet-users+unsubscr...@googlegroups.com.
 To post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: puppet fails to install some packages but succeed if I do a manual apt-get update --fix-missing. using puppetlabs/apt module

2013-07-29 Thread jcbollinger


On Sunday, July 21, 2013 6:56:12 PM UTC-5, Alon Nisser wrote:

 Running puppet from vagrant.
 this is my puppet code:

 package {
 [build-essential,apache2,git,python,python-dev,python-setuptools, 
 python-pip]:
 ensure = present,
 require = Class[apt],
 }
 # include apt
 class {apt:
 always_apt_update = true,
 }
 apt::builddep { [python-imaging,python-lxml]:

  }
 include nodejs
 package {less:
 ensure = present,
 provider = 'npm',
 require = Package['npm'],
 }
 package {python-virtualenv:
 ensure = present,
 require = Package[python-pip, python-setuptools]
 }
 package {sphinx:
 ensure = present,
 require = Package[python-pip],
 provider = pip
 }
 service {'apache2':
 ensure = running,
 enable = true,
 #subscribe = File[/etc/apache2/apache2.conf]
 }
 #include postgresql
 class { 'postgresql':
   charset = 'UTF8',
   require = Class['apt'],
 }- class { 'postgresql::server':
 config_hash = {
 'ip_mask_deny_postgres_user' = '0.0.0.0/32',
 'ip_mask_allow_all_users'= '0.0.0.0/0',
 'listen_addresses'   = '*',
   },
 }
 class {'postgresql::client':
 package_ensure = present,
 require = Class['postgresql'],
 }
 class {'postgresql::python':
 package_ensure = present,
 require = Class['postgresql'],
 }


 The error: would be glad with any help with this 

  

 ←[0;36mnotice: /Stage[main]//Package[sphinx]: Dependency 
 Exec[apt-builddep-pytho
 n-imaging] has failures: true←[0m
 ←[0;36mnotice: /Stage[main]//Package[sphinx]: Dependency 
 Exec[apt-builddep-pytho
 n-lxml] has failures: true←[0m
 ←[0;33mwarning: /Stage[main]//Package[sphinx]: Skipping because of failed 
 depend
 encies←[0m
 ←[0;36mnotice: /Stage[main]//Package[python]: Dependency 
 Exec[apt-builddep-pytho
 n-imaging] has failures: true←[0m
 ←[0;36mnotice: /Stage[main]//Package[python]: Dependency 
 Exec[apt-builddep-pytho
 n-lxml] has failures: true←[0m
 ←[0;33mwarning: /Stage[main]//Package[python]: Skipping because of failed 
 depend
 encies←[0m

 [...]

If you run the agent with the --debug flag enabled then Puppet should log 
the exact commands it attempts to execute.  That may provide a clue as to 
why the Apt::Builddep resources are failing.  From what I can see, those 
failures are the root cause of your problem.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Verify variable value and set to default param if out of range?

2013-07-29 Thread Stephen Brown II
Greetings all,

I have a feeling I'm trying to be a bit too clever for my own good, or 
making the mistake of treating the declarative language as a procedural. 
But at any rate, here is my issue.

I would like to set up a params class ( in the style of 
http://docs.puppetlabs.com/guides/parameterized_classeshttp://docs.puppetlabs.com/guides/parameterized_classes.html#appendix-smart-parameter-defaults
 ) for 
installing mariadb on any operating system that is supported by the 
official mariadb.org repository configuratior: 
https://downloads.mariadb.org/mariadb/repositories/

However, I've noticed that not all versions of MariaDB are available for 
all OS releases. For the most part, 5.5 and 10.0 are available, but for 
older versions of Ubuntu /(hardy|maverick|natty|oneiric)/, only 5.2 and 5.3 
are available.

Here is the gist of my params.pp as it stands: 
https://gist.github.com/StephenBrown2/6106113

What I would eventually like to get working is the ability for the module 
to set a reasonable default, and also allow for overriding in the calling, 
but if the operating system doesn't support that MariaDB release version, 
to use the latest available release instead.

For example, this should work fine:

class { 'maria': }

This should also work:

class { 'maria':
  version = '5.5',
}

both resulting in mariadb 5.5 being installed on anything but those older 
ubuntu's. in which case, Puppet would throw a warning and set $version 
instead to '5.3'.

Similarly, if this was specified:

class { 'maria':
  version = '5.3',
}

on a Debian 7 system, I'd expect it to come back as '10.0'. But this might 
be where the cleverness could be a liability.

Might I have to simply set the default version for each possible 
operatingsystem value? I would hope not, as that seems a bit unweildy, but 
maybe necessary since variables can only be declared once per scope ( 
http://docs.puppetlabs.com/learning/variableshttp://docs.puppetlabs.com/learning/variables.html#variables
 : You can only assign the same variable *once* in a given scope. )

Please let me know if I've been unclear, or enlighten me if this is going 
down the wrong path.

Thanks!
Stephen B

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] puppet apply --hiera_config -- Error: Could not find class

2013-07-29 Thread Werner Dijkerman
Hi there,

I'm running into an problem which I can resolve. It is bugging me for 
couple of days now.
Goal: CentOS 6.4 freshly installed incl puppet 3.2.3 and I want to install 
puppet master, puppetdb, mod_passenger  apache with puppet apply. So 
when this is complete, I should have an puppet master server running so I 
can create new hosts etc.

So this is the command and error:
[root@vserver-151 ~]# puppet apply --hiera_config /etc/puppet/hiera.yaml 
--modulepath=/etc/puppet/modules/management/ /etc/puppet/manifests/site.pp 
--environment management  --debug
Info: Loading facts in 
/etc/puppet/modules/management/staging/lib/facter/staging_http_get.rb
Info: Loading facts in 
/etc/puppet/modules/management/concat/lib/facter/concat_basedir.rb
Info: Loading facts in 
/etc/puppet/modules/management/stdlib/lib/facter/puppet_vardir.rb
Info: Loading facts in 
/etc/puppet/modules/management/stdlib/lib/facter/root_home.rb
Info: Loading facts in 
/etc/puppet/modules/management/stdlib/lib/facter/facter_dot_d.rb
Info: Loading facts in 
/etc/puppet/modules/management/stdlib/lib/facter/pe_version.rb
Info: Loading facts in 
/etc/puppet/modules/management/postgresql/lib/facter/postgres_default_version.rb
Info: Loading facts in 
/etc/puppet/modules/management/firewall/lib/facter/iptables_version.rb
Info: Loading facts in 
/etc/puppet/modules/management/firewall/lib/facter/iptables_persistent_version.rb
Info: Loading facts in 
/etc/puppet/modules/management/firewall/lib/facter/ip6tables_version.rb
Info: Loading facts in 
/etc/puppet/modules/management/puppet/lib/facter/etckepper_puppet.rb
Debug: hiera(): Hiera YAML backend starting
Debug: hiera(): Looking up classes in YAML backend
Debug: hiera(): Looking for data source Nieuwegein/base
Debug: hiera(): Found classes in Nieuwegein/base
Debug: hiera(): Looking for data source 
Nieuwegein/management/vserver-151.dj-wasabi.nl
Debug: hiera(): Found classes in 
Nieuwegein/management/vserver-151.dj-wasabi.nl
Debug: hiera(): Looking for data source Nieuwegein/management
Debug: hiera(): Data retrieved from 
/etc/puppet/hieradata/Nieuwegein/management.yaml is not a Hash, setting 
defaults
Debug: hiera(): Looking for data source Nieuwegein/common
Debug: hiera(): Looking for data source common
Debug: hiera(): Data retrieved from /etc/puppet/hieradata/common.yaml is 
not a Hash, setting defaults
Error: Could not find class users for vserver-151.dj-wasabi.nl on node 
vserver-151.dj-wasabi.nl
Error: Could not find class users for vserver-151.dj-wasabi.nl on node 
vserver-151.dj-wasabi.nl
[root@vserver-151 ~]#

To give some information about the hiera files:
[root@vserver-151 ~]# cat /etc/puppet/hiera.yaml 
---
:backend:
  - yaml
:hierarchy:
  - %{location}/base
  - %{location}/%{environment}/%{fqdn}
  - %{location}/%{environment} 
  - %{location}/common
  - common
:yaml:
   :datadir: '/etc/puppet/hieradata'

My location file
[root@vserver-151 ~]# cat /etc/facter/facts.d/location.yaml 
---
location: Nieuwegein

base file:
[root@vserver-151 ~]# cat /etc/puppet/hieradata/Nieuwegein/base.yaml 
---
classes: [ 'users', 'puppet::agent' ]

puppet::agent::puppet_server: vserver-151.dj-wasabi.nl
puppet::agent::puppet_server_port: 8140
puppet::agent::puppet_run_interval: 30

common file:
[root@vserver-151 ~]# cat /etc/puppet/hieradata/Nieuwegein/common.yaml 
---

nagios_server = 192.168.1.222

# nrpe stuff
nrpe_config_dir: /etc/nrpe.d
nrpe_scripts_dir: /usr/lib64/nagios/plugins/contrib

My site.pp
[root@vserver-151 defines]# cat /etc/puppet/manifests/site.pp 
node default {
   hiera_include('classes','')
}

Configuration file for this host:
[root@vserver-151 Nieuwegein]# cat 
/etc/puppet/hieradata/Nieuwegein/management/vserver-151.dj-wasabi.nl.yaml 
---
classes: ['ruby', 'puppet::master', 'puppetdb', 'apache' ]

puppet::master::storeconfigs: true
puppet::master::autosign: true
puppet::master::puppet_passenger_port: 8140
puppet::master::storeconfigs_dbserver: vserver-151.dj-wasabi.nl

puppet_server_environments:
  production:
modulepath: /etc/puppet/modules/production/
manifest: /etc/puppet/manifests/site.pp
  development:
modulepath: /etc/puppet/modules/development/
manifest: /etc/puppet/manifests/site.pp
  management:
modulepath: /etc/puppet/modules/management/
manifest: /etc/puppet/manifests/site.pp
[root@vserver-151 Nieuwegein]#

Overview of the 'management modules' directory:
[root@vserver-151 ~]# ls -l /etc/puppet/modules/management/
total 80
drwxr-xr-x 8 root root 4096 Jul 27 20:43 apache
drwxr-xr-x 6 root root 4096 Jul 27 20:43 apt
drwxr-xr-x 4 root root 4096 Jul 27 20:43 bin
drwxr-xr-x 6 root root 4096 Jul 27 20:43 concat
drwxr-xr-x 5 root root 4096 Jul 27 20:43 firewall
drwxr-xr-x 5 root root 4096 Jul 27 20:43 inifile
drwxr-xr-x 7 root root 4096 Jul 27 20:43 mrepo
drwxr-xr-x 8 root root 4096 Jul 27 20:43 mysql
drwxr-xr-x 7 root root 4096 Jul 27 20:43 nrpe
drwxr-xr-x 6 root root 4096 Jul 27 20:43 ntp
drwxr-xr-x 5 root root 4096 Jul 27 20:43 passenger
drwxr-xr-x 8 

[Puppet Users] puppet environments not working

2013-07-29 Thread me 1
I have a surprising problem with environments not working, i'm using rhel 
6.3 with puppet-3.2.3-1.el6.noarch  and here is the puppet.conf on the 
master:

[main]
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $vardir/ssl
server = puppet.local
reports = store, http
reporturl = http://localhost:80/reports/upload
modulepath = $confdir/modules
manifest = $confdir/manifests/site.pp

[preprod]
modulepath = $confdir/environments/preprod/modules
manifest = $confdir/environments/preprod/manifests/site.pp

[agent]
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig




When I make a change to 1 of the modules in the preprod modulepath, all I 
ever see is this on the client:


$ puppet agent --test --noop --environment preprod --configprint environment
preprod


$ puppet agent --test --noop --environment preprod
Info: Retrieving plugin
Info: Caching catalog for testvm.local
Info: Applying configuration version '1375125121'
Notice: Finished catalog run in 0.01 seconds



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Augeas, fstab and duplicate lines: How to test ? (onlyif ? not_include ?) ... Examples ?

2013-07-29 Thread haraldchris
Hi,

I am trying to define a new type that will insert a new filesystem line 
into /etc/fstab.

However, no matter what I tried, it will insert a new line each time.

Something like this doesn't work 

augeas { $title:
context = '/files/etc/fstab',
changes = [
set 01/spec $fs_dev,
set 01/file $fs_mount,
set 01/vfstype  $fs_type,
set 01/opt  $fs_opts,
set 01/dump $fs_dump,
set 01/passno   $fs_fsck,
set 01/#comment $fs_comment,
],
onlyif = match */spec[. = $fs_dev] size == 0# also 
tried match *[spec] not_include $fs_dev
}

The not_include option doesn't seem to work either ... or maybe I din't 
know how to use it (very few examples around to say the least)

unless is not available with augeas (I believe)

Any suggestions ?

(I already know about the available fstab module but I want to understand 
what is going on here)

Many thanks.

Cheers.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] puppetlabs-ntp: templates merge, and new features

2013-07-29 Thread Ashley Penney
Hey guys,

https://github.com/puppetlabs/puppetlabs-ntp/pull/80 adds some fairly
significant changes and so I wanted to put it up for review early before
going any further.

The big change is that it gets rid of the distro specific templates in
favor of one more sophisticated template we can start adding options to and
increasing the flexibility of.

To that end it adds a bunch of params to handle ntp keys - is there anyone
on the list using ntp keys?  If so does this feature make sense to you?  Do
you want more? less? different things?

We add preferred_servers for dalen.  Hopefully this is what he wanted!

We add driftfile as a param in case you like to store it in non-standard
places. :)

Anyway, hopefully you guys can tear this apart and find all the flaws and
suggest missing features.  I would appreciate any reviews of the new
template especially as now is the time to find gaps and flaws in it!

Thanks,

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Bring a friend to PuppetConf!

2013-07-29 Thread Luke Kanies
Hi all,

PuppetConf is just a few weeks away, believe it or not - the sessions are 
August 22-23, and there's training in SF the week before and after. Last year's 
conference was so packed, we’re hosting PuppetConf 2013 in a bigger (and more 
awesome) venue this year: San Francisco’s historic Fairmont Hotel. We have more 
educational tracks and an amazing speaker lineup[1]. You can get a quick intro 
to the venue and conference in a video tour I took of the hotel:

http://puppetconf.com/location/

We’re offering a special 2-for-1 discount to all of you on the puppet users 
list. Bring a friend to PuppetConf, and you’ll each get a 50 percent discount. 
Here’s your code to register yourself and your friend (make sure to scroll down 
to access the 2-for-1 promotion):

http://puppetconf2013.eventbrite.com/?access=BUYONEGETONE

But hurry, we've limited slots, and we already have more registered than 
attended in 2012. Find a friend and sign up today.  Given that a third to half 
of the attendees at our events tend to be new users, I think this is a great 
way to make it even easier for you to bring new people.

This year’s speakers and tracks will offer great information and advice for 
people working in all kinds of organizations — from startups to the Fortune 
500, and everything in between. We’re featuring sessions for Puppet beginners; 
speakers from companies doing very interesting things with Puppet Labs 
technologies; and an inside look at upcoming developments. And one of the best 
things about the venue is there will be lots of great places in the hallway 
track to hang out and get to know the community.

Hope to see you in a few weeks,

Luke

1 - http://puppetconf.com/schedule/ 

-- 
Luke Kanies | http://about.me/lak | http://puppetlabs.com/ | +1-615-594-8199
Join us at PuppetConf 2013, August 22-23 in San Francisco - 
http://bit.ly/pupconf13

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: a different ssh::auth problem

2013-07-29 Thread Joseph Mwesigwa Bbaale
Hi Stephen,

Thank you so much for the clarification.
I am going to the documents that you have recommended.

Regards,

Joseph

On Monday, 29 July 2013 20:26:41 UTC+3, Stephen Brown II wrote:

 Greetings,

 I'm also new to puppet, but the documentation is basically informing you 
 about the way puppet modules are laid out. From the Puppet documentation (
 http://docs.puppetlabs.com/puppet/3/reference/modules_fundamentals.html):
 On disk, a module is simply a directory tree with a specific, predictable 
 structure:

 MODULE NAME
 |--manifests
 |--files
 |--templates
 |--lib
 |--tests
 \--spec1

 So it is perfectly fine for you to create the ssh/manifests directory and 
 place the auth.pp file in there. That's where Puppet expects it to be.

 I'd recommend going through the Puppet reference to get more information 
 on it, and possbly trying out the Learning Puppet VM Tutorial (
 http://docs.puppetlabs.com/learning/), which also has a section on 
 Modules and Classes (http://docs.puppetlabs.com/learning/modules1.html)

 Hope this helps!
 Stephen

 On Monday, July 29, 2013 4:12:48 AM UTC-4, Joseph Mwesigwa Bbaale wrote:

 Hi,

 I am very new to puppet.

 I installed puppet 3.2.3 (open source) on Debian Wheezy. Everything seems 
 to work fine.

 Now I want to setup ssh::auth on the puppet master. The documentation 
 states that:

 To install ssh::auth, place the file 
 auth.pphttp://projects.reductivelabs.com/attachments/935/auth.pp (attached 
 to this page) into the ssh/manifests directory in your module path: for 
 example, /etc/puppet/modules/ssh/manifests/auth.pp.


 Unfortunately my system does not have ssh/manifest and therefore I 
 wonder, I this a minor issue? If not, how do I go about setting up ssh:auth 
 in this environment?

 Any help offered is highly appreciated.

 Joseph



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.