Re: [Puppet Users] Trouble with file in module 'source => "puppet://...'"

2013-05-21 Thread Charly Mathieu
Ah yes ! Thank you, that makes sense actually, I didn't realized it before.

Thank to both of you, have a nice day :)

Le mardi 21 mai 2013 18:00:53 UTC+2, Ramin K a écrit :
>
> On 5/21/2013 8:55 AM, Charly Mathieu wrote: 
> > Hello, 
> > 
> > I'm trying to write my first module, but I have a problem with a conf 
> > file I want to be managed with puppet. 
> > It's an apache2 vhost file, so the name is "www.example.com", my 
> > ressource is like : 
> > 
> > file { 'a2site' : 
> > ensure => present, 
> > path => '/etc/apache2/sites-available/www.example.com', 
> > source => 
> > 
> "puppet://modules/websitemodule/${conf_file}/etc/apache2/sites-available/
> www.example.com", 
> > require => File['a2conf'], 
> > } 
>
> It's possible to serve files from other places than the Puppetmaster 
> using this syntax. Note the two forward slashes. 
> puppet://servername/path/to/file 
>
> In your case you want the file to come from the local server, so you 
> need three forward slashes to indicate that as in following. 
> puppet:///local/path/to/file 
>
> Ramin 
>
>
>
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] avoiding duplicate package definitions with stdlib's "ensure_packages"

2013-05-21 Thread David Schmitt
On Tue, 21 May 2013 13:27:28 -0400, Jonathan Proulx 
wrote:
> One of the most frustrating things about puppet is duplicate definitions
of
> packages,
> 
> The "ensure_packages" function from stdlib seems very much like the
correct
> way to handle this:
> 
> newfunction(:ensure_packages, :type => :statement, :doc => <<-EOS
> Takes a list of packages and only installs them if they don't already
> exist.
> EOS
>   ) do |arguments|
> 
> Why isn't this a core feature?  Or better why aren't resources that are
> identical merged?  Clearly there is a conflict if they are defined with
> different parameter (ensure => installed -vs ensure => latest for
example)
> but if they are really identical where is the conflict?
> 
> My current situation is that we define parted and xfsprogs in our local
> site configs and the enovance ceph modules also do so.  Both of these
seem
> reasonable to me as we need them to make all our systems go and the ceph
> module needs them to set up the object storage volumes (which is it's
> primary function) and can't assume everyone uses parted and xfs.
> 
> The two prevailing opinions in my web readings seem to be to use Virtual
> resources which is fine for local modules but not so good for sharing
and
> the purist opinion that if there is a conflict the conflicting parts
should
> be split out into an independent module, which is fine for large
functional
> chunks like httpd but ridiculous for single utilities that require no
> configuration.
> 
> Yet there is little discussion of ensure_packages as an alternative.  Is
> this for cause or just because it is not well known?

Just because it is not well known. ensure_packages seems to be designed
for exactly the use-case you are describing: you have two modules both
requiring the same utility packages without caring at all about versions or
anything else.

To elaborate: contrary to (most, all?) other resources, packages have this
no-parameter use case, which allows conflict-free merging. Managing more
complex resources (users, files) would require more cooperation between
modules to ensure that the different requirements do not step on each
other.


Regards, David

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: PuppetDB: SSL problems

2013-05-21 Thread kl . puppetuser
Opened bug 20838: http://projects.puppetlabs.com/issues/20838

Thanks,
kl


-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Workaround for Puppet 3 not working in Fedora 18

2013-05-21 Thread Pete Brown
On 22 May 2013 00:41, Tom Poulton  wrote:

> So I get the move to systemd (whatever that is) if that's what Fedora
> uses, but why rename the "service", that means I have to add a special case
> in my puppet module just for Fedora to set the name of the service resource
> to "puppetagent"? Unless it's a change they're going to roll out to all
> their supported environments in which case that makes sense (sort of)!?
>

Yeah I am not sure about that either and yes it does seem weird to me as
well given it's supposed to be OS agnostic..
puppet and puppet-master are in the testing repo for fedora so maybe it's a
future "update" for all operating systems.



>  --
> 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?hl=en.
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Problem creating user with Puppet

2013-05-21 Thread Jeff Zellner
>From the docs for `home`: "The home directory of the user. The
directory must be created separately and is not currently checked for
existence."

`managehome` doesn't ensure the creation of the home directory, I
believe it just checks permissions.

Cheers!

-Jeff

On Tue, May 21, 2013 at 6:22 PM, Denmat  wrote:
> Hi,
>
> That should work. Can you provide a bit more info? Versions of puppet and
> Ubuntu.
>
> Can you also provide the output from your run with --debug?
>
> Make sure the user is removed before you run again.
>
> Cheers
> Den
>
> On 21/05/2013, at 22:39, dusan.dorde...@clavistechnology.com wrote:
>
> Hi,
>
> I am trying to create user on Ubuntu using this code:
>
> user { "clavis":
> ensure => "present",
> home => "/home/clavis",
> name => "clavis",
> shell => "/bin/bash",
> managehome => true,
> groups => 'clavis',
> require => Group['clavis']
> }
>
> User is created properly, but home directory is not created, although I
> explicitly set mamagehome to true. Any idea what might be the problem here ?
>
> Thanks in advance,
> Dusan
>
> --
> 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?hl=en.
> 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?hl=en.
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Problem creating user with Puppet

2013-05-21 Thread Denmat
Hi,

That should work. Can you provide a bit more info? Versions of puppet and 
Ubuntu.

Can you also provide the output from your run with --debug? 

Make sure the user is removed before you run again.

Cheers
Den

On 21/05/2013, at 22:39, dusan.dorde...@clavistechnology.com wrote:

> Hi,
> 
> I am trying to create user on Ubuntu using this code:
> 
> user { "clavis":
> ensure => "present",
> home => "/home/clavis",
> name => "clavis",
> shell => "/bin/bash",
> managehome => true,
> groups => 'clavis',
> require => Group['clavis']
> }
> 
> User is created properly, but home directory is not created, although I 
> explicitly set mamagehome to true. Any idea what might be the problem here ?
> 
> Thanks in advance,
> Dusan
> -- 
> 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?hl=en.
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: avoiding duplicate package definitions with stdlib's "ensure_packages"

2013-05-21 Thread jcbollinger


On Tuesday, May 21, 2013 12:27:28 PM UTC-5, Jonathan Proulx wrote:
>
> One of the most frustrating things about puppet is duplicate definitions 
> of packages, 
>
> The "ensure_packages" function from stdlib seems very much like the 
> correct way to handle this:
>
> newfunction(:ensure_packages, :type => :statement, :doc => <<-EOS
> Takes a list of packages and only installs them if they don't already 
> exist.
> EOS
>   ) do |arguments|
>
> Why isn't this a core feature?  Or better why aren't resources that are 
> identical merged?  Clearly there is a conflict if they are defined with 
> different parameter (ensure => installed -vs ensure => latest for example) 
> but if they are really identical where is the conflict?
>
>

This topic has come up before.  You will probably find a lot of discussion 
about it under the heading of "module compatibility".

Anyway, where resources are indeed identical, I see no inherent harm in 
merging them.  Your manifest set would become more brittle the more it 
relied on such merging, but I suspect the feature would have nevertheless 
been implemented already if it were easy to do.  I can think of several 
reasons why it might actually be tricky to do this.

 

> My current situation is that we define parted and xfsprogs in our local 
> site configs and the enovance ceph modules also do so.  Both of these seem 
> reasonable to me as we need them to make all our systems go and the ceph 
> module needs them to set up the object storage volumes (which is it's 
> primary function) and can't assume everyone uses parted and xfs.
>
> The two prevailing opinions in my web readings seem to be to use Virtual 
> resources which is fine for local modules but not so good for sharing and 
> the purist opinion that if there is a conflict the conflicting parts should 
> be split out into an independent module, which is fine for large functional 
> chunks like httpd but ridiculous for single utilities that require no 
> configuration.
>


The key factor here is that you very much (should) want a single 
authoritative source describing each managed resource.  *That* is what you 
get by putting it in a separate module on which all others that need the 
resource rely.  I don't find that ridiculous at all, given how lightweight 
modules are, but if it made you feel better then you could plan for a 
single module with which to meet many such needs.

Using virtual resources also gives you a single authoritative source, but 
it leaves open the question of to which module the resource should belong.  
Indeed, it might not be unreasonable to make virtual *and* put it into a 
separate module.  Whether use of virtual resources across module boundaries 
is conducive to sharing matters only if you are planning to share.

The simple fact that two modules both depend on the same resource, but 
cannot either one depend on the other module, indicates to me that the 
resource in question does not belong in either module.  It is a question of 
accurately modeling the target configuration space, and how large or small 
the resulting classes and modules end up being is at best a secondary 
consideration.  If you use crude models, then you are likely to encounter 
problems from time to time, and that's exactly what is happening to you now.

 

>
> Yet there is little discussion of ensure_packages as an alternative.  Is 
> this for cause or just because it is not well known?
>
>

It is at least partly because ensure_packages() is little known.  It may 
also be because ensure_packages() is itself a crude tool, susceptible to 
producing inconsistent configurations for different machines and/or over 
time, and applicable only to Package resources.  It is worse than merging 
identical resource declarations, because it will hide even non-identical 
declarations of the same resource.  If you use it then it is highly likely 
to take a chunk out of your gluteus maximus sometime in the future.


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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] avoiding duplicate package definitions with stdlib's "ensure_packages"

2013-05-21 Thread Joe Topjian
Wow - I never knew about ensure_packages. I'm not sure if I overlooked it
or if it's relatively new, but either way, I agree that it should be more
widely used.

I run into the same issue that you described when using third-party
modules. I try to avoid this in my own modules by only managing packages
that are core to the module and expect the user to manage secondary
packages on their own. Unfortunately this method imposes more
responsibility onto the user. ensure_packages might be a good solution to
this.


On Tue, May 21, 2013 at 11:27 AM, Jonathan Proulx  wrote:

> One of the most frustrating things about puppet is duplicate definitions
> of packages,
>
> The "ensure_packages" function from stdlib seems very much like the
> correct way to handle this:
>
> newfunction(:ensure_packages, :type => :statement, :doc => <<-EOS
> Takes a list of packages and only installs them if they don't already
> exist.
> EOS
>   ) do |arguments|
>
> Why isn't this a core feature?  Or better why aren't resources that are
> identical merged?  Clearly there is a conflict if they are defined with
> different parameter (ensure => installed -vs ensure => latest for example)
> but if they are really identical where is the conflict?
>
> My current situation is that we define parted and xfsprogs in our local
> site configs and the enovance ceph modules also do so.  Both of these seem
> reasonable to me as we need them to make all our systems go and the ceph
> module needs them to set up the object storage volumes (which is it's
> primary function) and can't assume everyone uses parted and xfs.
>
> The two prevailing opinions in my web readings seem to be to use Virtual
> resources which is fine for local modules but not so good for sharing and
> the purist opinion that if there is a conflict the conflicting parts should
> be split out into an independent module, which is fine for large functional
> chunks like httpd but ridiculous for single utilities that require no
> configuration.
>
> Yet there is little discussion of ensure_packages as an alternative.  Is
> this for cause or just because it is not well known?
>
> -Jon
>
> --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Joe Topjian
Systems Architect
Cybera Inc.

www.cybera.ca

Cybera is a not-for-profit organization that works to spur and support
innovation, for the economic benefit of Alberta, through the use
of cyberinfrastructure.

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] avoiding duplicate package definitions with stdlib's "ensure_packages"

2013-05-21 Thread Jonathan Proulx
One of the most frustrating things about puppet is duplicate definitions of
packages,

The "ensure_packages" function from stdlib seems very much like the correct
way to handle this:

newfunction(:ensure_packages, :type => :statement, :doc => <<-EOS
Takes a list of packages and only installs them if they don't already exist.
EOS
  ) do |arguments|

Why isn't this a core feature?  Or better why aren't resources that are
identical merged?  Clearly there is a conflict if they are defined with
different parameter (ensure => installed -vs ensure => latest for example)
but if they are really identical where is the conflict?

My current situation is that we define parted and xfsprogs in our local
site configs and the enovance ceph modules also do so.  Both of these seem
reasonable to me as we need them to make all our systems go and the ceph
module needs them to set up the object storage volumes (which is it's
primary function) and can't assume everyone uses parted and xfs.

The two prevailing opinions in my web readings seem to be to use Virtual
resources which is fine for local modules but not so good for sharing and
the purist opinion that if there is a conflict the conflicting parts should
be split out into an independent module, which is fine for large functional
chunks like httpd but ridiculous for single utilities that require no
configuration.

Yet there is little discussion of ensure_packages as an alternative.  Is
this for cause or just because it is not well known?

-Jon

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] puppet dahsboard class counter

2013-05-21 Thread lucy . netcetera
 

Hi List,

I have running installation of the puppet-dashboard (a really nice tool) 
and import my classes and group according to my need with the following 
small bash lines. 

# add classes into dashboard
for name in  `ls /var/lib/puppet/manifests/classes/ | sed s/\.pp$//g -`
  do rake -f /usr/share/puppet-dashboard/Rakefile RAILS_ENV=production 
nodeclass:add name=$name;
done;

# add nodes to its classes
for node in `find /var/lib/puppet/manifests/nodes/ | sed s/.*net\.pp$//g -`
  do for class in `grep include $node | sed s/include//g -`
do rake -f /usr/share/puppet-dashboard/Rakefile RAILS_ENV=production  
node:addclass name=`echo $node | sed s/\.pp$//g - | cut -c30-100 -` 
class=$class;
  done;
done;

# add groups into dashboard
for group in `find /var/lib/puppet/manifests/nodes/ -name *net.pp | cut 
-c33-100 | sed s/\.pp//g -`;
  do rake -f /usr/share/puppet-dashboard/Rakefile RAILS_ENV=production 
nodegroup:add name=$group;
done;

# add noeds to its group
for node in `find /var/lib/puppet/manifests/nodes/ | sed s/.*net\.pp//g -`;
  do group=`grep inherits $node | awk '{split($0,a,"\""); print a[4]}'`;
  rake -f /usr/share/puppet-dashboard/Rakefile RAILS_ENV=production 
node:addgroup name=`echo $node | sed s/\.pp//g - | cut -c30-100 -`  
group=$group;
done;

# add classes to a group
for group in `find /var/lib/puppet/manifests/nodes/ -name "*net\.pp"`;
  do for class in `grep include $group | sed s/include//g -`;
do rake -f /usr/share/puppet-dashboard/Rakefile RAILS_ENV=production  
nodegroup:addclass name=`echo $group | sed s/\.pp$//g - | cut -c33-100 -` 
class=$class;
  done;
done;

But in any way I have two questions.

1.) Way are the classes not imported automatically like the nodes? I know 
that the better way would be to use modules but till now I could not change 
all me classes to modules and in anyway modules are also not imported 
directly into the puppet-dashboard.

2.) I have now groups that have some classes and some nodes. And even if I 
click on a node I can see the classes that it has from its group (really 
cool). But why is the counter of a classes that belonges to a group not 
increased by the number of the nodes in the group?  

Thanks for any reason in advance
Lucy

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] puppet 3.1.1-1 ignores runinterval (?)

2013-05-21 Thread Sebastian Kösters
Hi,

i recently updated from puppet 2.x to puppet 3.1.1-1 (centos 6) and 
noticed, that my puppet runs heavily increased.

My config:

[...]
runinterval = 1200
report = true
splay = true
splaylimit = 300
[...]

but instead of running every 1200 seconds it runs every few minutes.


May 19 03:31:01 issum puppet-agent[16435]: Finished catalog run in 6.12 
seconds
May 19 03:38:24 issum puppet-agent[17188]: Finished catalog run in 11.84 
seconds
May 19 03:41:32 issum puppet-agent[17874]: Finished catalog run in 5.28 
seconds
May 19 03:51:05 issum puppet-agent[18745]: Finished catalog run in 6.16 
seconds
May 19 03:58:27 issum puppet-agent[19476]: Finished catalog run in 12.57 
seconds

the interval changes from server to server. A different server:

May 19 03:38:26 cupertino puppet-agent[15310]: Finished catalog run in 
17.42 seconds
May 19 03:50:50 cupertino puppet-agent[16492]: Finished catalog run in 9.60 
seconds
May 19 03:51:50 cupertino puppet-agent[17110]: Finished catalog run in 9.82 
seconds
May 19 03:58:29 cupertino puppet-agent[17927]: Finished catalog run in 
17.20 seconds
May 19 04:10:58 cupertino puppet-agent[19215]: Finished catalog run in 
16.31 seconds
May 19 04:11:50 cupertino puppet-agent[19834]: Finished catalog run in 9.18 
seconds

also i noticed more processes running at the same time

  745 ?Ss 0:11 /usr/bin/ruby /usr/bin/puppet agent 
--server=puppet.th --report
 2618 ?Ss 0:11 /usr/bin/ruby /usr/bin/puppet agent 
--server=puppet.th --report
 5531 ?Ss 0:12 /usr/bin/ruby /usr/bin/puppet agent 
--server=puppet.th --report
 8371 ?Ss 0:11 /usr/bin/ruby /usr/bin/puppet agent 
--server=puppet.th --report
11817 ?Ss 0:11 /usr/bin/ruby /usr/bin/puppet agent 
--server=puppet.th --report
29503 ?Ss 0:11 /usr/bin/ruby /usr/bin/puppet agent 
--server=puppet.th --report
30903 ?Ss 0:01 /usr/bin/ruby /usr/bin/puppet agent 
--server=puppet.th --report
31493 ?Ss 0:11 /usr/bin/ruby /usr/bin/puppet agent 
--server=puppet.th --report

this all started after upgrading from 2.x to 3.x

Any ideas?

Thanks and best regards
Sebastian

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Trouble with file in module 'source => "puppet://...'"

2013-05-21 Thread Ramin K

On 5/21/2013 8:55 AM, Charly Mathieu wrote:

Hello,

I'm trying to write my first module, but I have a problem with a conf
file I want to be managed with puppet.
It's an apache2 vhost file, so the name is "www.example.com", my
ressource is like :

file { 'a2site' :
ensure => present,
path => '/etc/apache2/sites-available/www.example.com',
source =>

"puppet://modules/websitemodule/${conf_file}/etc/apache2/sites-available/www.example.com",
require => File['a2conf'],
}


It's possible to serve files from other places than the Puppetmaster 
using this syntax. Note the two forward slashes.

puppet://servername/path/to/file

In your case you want the file to come from the local server, so you 
need three forward slashes to indicate that as in following.

puppet:///local/path/to/file

Ramin



--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Trouble with file in module 'source => "puppet://...'"

2013-05-21 Thread Matthew Burgess
Hi Charly,

I think you're just missing a 3rd '/' in your source, i.e. it should be:

puppet:///modules/websitemodule/${conf_file}/etc/apache2/sites-available/
www.example.com"

Here, 'puppet://' is the protocol and the next '/' is for the root of the
puppet file server.

Regards,

Matt.


On Tue, May 21, 2013 at 4:55 PM, Charly Mathieu wrote:

> Hello,
>
> I'm trying to write my first module, but I have a problem with a conf file
> I want to be managed with puppet.
> It's an apache2 vhost file, so the name is "www.example.com", my
> ressource is like :
>
> file { 'a2site' :
>> ensure => present,
>> path => '/etc/apache2/sites-available/www.example.com',
>> source =>
>> "puppet://modules/websitemodule/${conf_file}/etc/apache2/sites-available/
>> www.example.com",
>> require => File['a2conf'],
>> }
>
>
> When I apply it, I got :
>
> err: /Stage[main]/Websitemodule::Initwordpress/File[a2site]: Could not
>> evaluate: getaddrinfo: Temporary failure in name resolution Could not
>> retrieve file metadata for
>> puppet://modules/websitemodule//etc/apache2/sites-available/
>> www.example.com: getaddrinfo: Temporary failure in name resolution at
>> /etc/puppet/modules/websitemodule/manifests/init.pp:53
>
>
> I think puppet understand that it has to look on the internet, with the
> protocol "puppet", because it reads the ".com" at the end.
>
> How can I fix this ?
>
> 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?hl=en.
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Trouble with file in module 'source => "puppet://...'"

2013-05-21 Thread Charly Mathieu
Hello,

I'm trying to write my first module, but I have a problem with a conf file 
I want to be managed with puppet.
It's an apache2 vhost file, so the name is "www.example.com", my ressource 
is like :

file { 'a2site' :
> ensure => present,
> path => '/etc/apache2/sites-available/www.example.com',
> source => 
> "puppet://modules/websitemodule/${conf_file}/etc/apache2/sites-available/www.example.com",
> require => File['a2conf'],
> }


When I apply it, I got : 

err: /Stage[main]/Websitemodule::Initwordpress/File[a2site]: Could not 
> evaluate: getaddrinfo: Temporary failure in name resolution Could not 
> retrieve file metadata for 
> puppet://modules/websitemodule//etc/apache2/sites-available/www.example.com: 
> getaddrinfo: Temporary failure in name resolution at 
> /etc/puppet/modules/websitemodule/manifests/init.pp:53

 
I think puppet understand that it has to look on the internet, with the 
protocol "puppet", because it reads the ".com" at the end.

How can I fix this ?

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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: PuppetDB: SSL problems

2013-05-21 Thread Ken Barber
I'm glad you found a solution :-).

I think this is a bug though. Would you mind if you raised a ticket
for this in our redmine tracker with the details of your error and
solution? At least if we can record it for the purpose of errata, it
might help someone else - or we might come to a proper solution around
it eventually.

http://projects.puppetlabs.com/projects/puppetdb/issues/new

BTW, what does your puppet.conf look like?

On Tue, May 21, 2013 at 6:36 AM,   wrote:
> Ken, it's working now! "Solution" below.
>
>
> On Fri, May 17, 2013 at 4:27 PM, Ken Barber  wrote:
>> Could very well be, however it seems so far you're the first unlucky
>> one to see this issue afaik :-). I've been trying to reproduce it on
>> my own setup with no luck yet, although I've got some ideas to try
>> today.
>
> Thanks a lot for trying though. Your replies have been very helpful.
>
>
>> Also - remember this command?
>>
>> echo "GET /" | openssl s_client -connect 127.0.1.1:8081 -cert
>> `puppet master --configprint hostcert` -key `puppet master
>> --configprint hostprivkey` -CAfile `puppet master --configprint
>> cacert`
>>
>> Did you try running that from the puppet master node itself -
>> attempting to connect to puppetdb? I believe the last test you tried
>> was directly from the puppetdb node instead.
>
> Good catch. I was trying it from the puppetdb itself. That was working well.
>
> I then tried from the puppet server itself. The problem was the following:
>  - For everything puppet, I use puppet.local as the fqdn for the puppet
> master.
>  - The actual hostname (and thus the cert) for the puppet master node
> is gaia.local.
>  - For some reason (config probably ;) ), puppet agents don't think
> this is a problem.
>  - When I tried your GET|openssl command, it was complaining about not
> being able to find certs/puppet.local.something and
> private_keys/puppet.local.something.
>  - I symlinked puppet.local (to use gaia.local, the actual
> certificate). This works. Probably not the nicest way, but it works!
> Exported config now works.
>
> I'm very happy it works now,
> Thanks again!
> /kl
>
>
> --
> 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?hl=en.
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Workaround for Puppet 3 not working in Fedora 18

2013-05-21 Thread Tom Poulton
So I get the move to systemd (whatever that is) if that's what Fedora uses,
but why rename the "service", that means I have to add a special case in my
puppet module just for Fedora to set the name of the service resource to
"puppetagent"? Unless it's a change they're going to roll out to all their
supported environments in which case that makes sense (sort of)!?

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Delete directory contents if this is older then ..

2013-05-21 Thread przemol


On Tuesday, May 21, 2013 11:52:22 AM UTC+1, Paul Tötterman wrote:
>
> Hi,
>
> Is there any other puppet recommended way of doing that ?
>>
>
> http://docs.puppetlabs.com/references/latest/type.html#tidy 
>
> Cheers,
> Paul
>

Thanks Paul - this is what I was looking for :-) 

Cheers
P.

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Puppet - rbuf_fill timeout error periodically on puppet client runs

2013-05-21 Thread phundisk
Occasionally I am seeing this error below on puppet client runs from 
several different clients.  The clients and the server in this environment 
are rather old and this started to happen more after I used to nagios 
module which uses stored configs.  Does anyone know where this slowness 
might be coming from (client, server, db, etc) or how I can increase this 
timeout parameter?  Or does this indicate some poor programming in my 
puppet code in terms of inefficiency.  I would say this happens maybe one 
or two times a week out of 20 servers running every 30 minutes.

*Current Setup:*
Puppet Server: puppet-server-2.7.20-1
Ruby: 1.8.7.370
Stored Configs: MySQL 5.5.15
Cron Run Command (no service): /usr/sbin/puppetd --server puppet --onetime 
--no-daemonize --verbose --logdest syslog

*Error*
/usr/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill': execution expired (Timeout::
Error)
from /usr/lib/ruby/1.8/timeout.rb:56:in `timeout'
from /usr/lib/ruby/1.8/timeout.rb:76:in `timeout'
from /usr/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
from /usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
from /usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
from /usr/lib/ruby/1.8/net/http.rb:2020:in `read_status_line'
from /usr/lib/ruby/1.8/net/http.rb:2009:in `read_new'
from /usr/lib/ruby/1.8/net/http.rb:1050:in `request'
 ... 24 levels...
from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:217:in `run'
from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:306:in 
`exit_on_fail'
from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:217:in `run'
from /usr/sbin/puppetd:159

-- 
_
This email and any files transmitted with it are confidential and intended 
solely for the addressee.  If you received this email in error, please do 
not disclose the contents to anyone; kindly notify the sender by return 
email and delete this email and any attachments from your system.

© 2011 Currensee Inc. is a member of the National Futures Association (NFA) 
Member ID 0403251 | Over the counter retail foreign currency (Forex) 
trading may involve significant risk of loss. It is not suitable for all 
investors and you should make sure you understand the risks involved before 
trading and seek independent advice if necessary. Performance, strategies 
and charts shown are not necessarily predictive of any particular result 
and past performance is no indication of future results. Investor returns 
may vary from Trade Leader returns based on slippage, fees, broker spreads, 
volatility or other market conditions.

Currensee Inc | 54 Canal St 4th Floor | Boston, MA 02114 | +1.617.624.3824

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Problem creating user with Puppet

2013-05-21 Thread dusan . dordevic
Hi,

I am trying to create user on Ubuntu using this code:

user { "clavis":
ensure => "present",
home => "/home/clavis",
name => "clavis",
shell => "/bin/bash",
managehome => true,
groups => 'clavis',
require => Group['clavis']
}

User is created properly, but home directory is not created, although I 
explicitly set mamagehome to true. Any idea what might be the problem here ?

Thanks in advance,
Dusan

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Delete directory contents if this is older then ..

2013-05-21 Thread Paul Tötterman
Hi,

Is there any other puppet recommended way of doing that ?
>

http://docs.puppetlabs.com/references/latest/type.html#tidy 

Cheers,
Paul

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Delete directory contents if this is older then ..

2013-05-21 Thread przemol
Hello,

I would like to clean up some directories (linux) and remove some old 
contents which is older than e.g. 7 days.
One way is to setup cron job (of course using puppet ...) which clears 
these directories.
Is there any other puppet recommended way of doing that ?

Regards

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Error with service: "invalid byte sequence in US-ASCII"

2013-05-21 Thread David Schmitt

On 19.05.2013 14:18, Mateusz Fiołka wrote:

I'm not sure if it is related to the services. It rather looks like
puppet related to me.
I'm having a similar problem on a newly created vps. When I do puppet
apply first time I get the message:

Error: Could not set 'present' on ensure: invalid byte sequence in
US-ASCII at 3:/root/mf-prod.pp


I've seen this error when the puppet master process started by init 
receives a different locale environment than when it is started from the 
command line.


Check /proc/$pid/env of the running puppet master process for LANG/LC_* 
and compare that to your shell env.



Regards, David

--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: removing hosts from puppet-monitor (example42)

2013-05-21 Thread Alessandro Franceschi
Hi Andreas,
to remove a node you can run:
puppet node deactivate 
on the PuppetMaster.

To be sure to have quicker answers about Example42 modules, please use:
https://groups.google.com/forum/?fromgroups#!forum/example42-puppet-modules

Ciao
Alessandro

On Sunday, April 28, 2013 1:34:12 PM UTC+2, Andreas Hilboll wrote:
>
> Hi, 
>
> I'm using the Example42 modules with the built-in monitoring 
> capabilities. How do I remove a host? 
>
> I deleted a host which was managed with the Example42 monitoring 
> enabled. Since I removed the host (i.e. switchced it off), I get 
> warnings that it is not available from my Icinga installation. I already 
> tried manually deleting the host's config files on the icinga host, but 
> they get restored on each puppet run. 
>
> How can I tell the puppet-monitor module that the host doesn't exist any 
> more? 
>
> Cheers, 
> -- 
> -- Andreas. 
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] example42 puppet-squid

2013-05-21 Thread Alessandro Franceschi
I confirm.
That Squid module is very old and is part of the "old generation" of 
Example42 Puppet modules, it was done before the release of Puppet 2.6 and 
doesn't support parameters (that's why you see errors when trying to pass 
parameters to it).
As author of the Example42 module I suggest to use only new (NextGen) 
modules. They are ther ones you see as git submodules in 
https://github.com/example42/puppet-modules (which still contains both new 
and old modules).
Fo next gen only modules you can refer to:
https://github.com/example42/puppet-modules

For questions specific to Example42 modules (and some documentation) you 
can use also this newly born Google group:
https://groups.google.com/forum/?fromgroups#!forum/example42-puppet-modules

Al

On Monday, May 13, 2013 11:39:44 PM UTC+2, Ashley Penney wrote:
>
> On Mon, May 13, 2013 at 5:21 PM, Jim Miller 
> > wrote:
>
>> I am using example42s squid module 
>> https://github.com/example42/puppet-modules/tree/master/squid, and 
>> trying to define certain user variable at the puppet/manifest/nodes.pp 
>> level   This is the first module of their's I've tried,  I've read over 
>> their documentation and FAQ and for the life of me I can not figure this 
>> out.  To me their examples are VERY HIGH level and I'm _really_ new to 
>> puppet.  I'm sure I'm missing something fundamental but I'm just not seeing 
>> it.  I've also installed example42s 'common' module which is needed to make 
>> the type of changes I'm talking about.
>>
>> The following works fine:
>> node 'xio99cdetest1.mygroup.com' {
>>  include squid
>> }
>>
>> AND
>>
>> node 'xio99cdetest1.mygroup.com' {
>>  class { 'squid':
>>squid_port => '3030',
>>   }
>> }
>>
>> Error: Could not retrieve catalog from remote server: Error 400 on 
>> SERVER: Invalid parameter squid_port at /etc/puppet/manifests/nodes.pp:94 
>> on node xio99cdejump01.centric.com
>>
>
> If you load up the init.pp from this module you'll notice that after the 
> "class squid" declaration there's no parameters listed for the class.  This 
> is because this is a "old style" module at this point and is just setting 
> variables directly in params.pp.  You would be best off looking for a 
> better squid module while you get up to speed on Puppet.
>
> The best I could find for you is https://github.com/dezwart/puppet-squid 
> currently, 
> if you look in the init.pp in there as a counter example to the example42 
> one you'll quickly see how the parameters belong directly to the class.  In 
> this case he doesn't have squid_port as a parameter, so it won't be usable 
> without modifications for you, but it's a better example of the kind of 
> structure a squid module should contain.
>
> If this is all horrible for you and you're not able to make any headway 
> let me know and I can give you some help to modify one of these modules to 
> make the port a parameter. 
>  

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet, git & security

2013-05-21 Thread Alex Harvey


On Friday, May 17, 2013 12:35:24 AM UTC+10, Martin Langhoff wrote:
>
> On Wed, May 15, 2013 at 2:44 AM, Stephen Gran 
> > wrote: 
> > Your push server can run git update and then rsync to the masters. 
>
> Why rsync if you have git? 
>

Martin, John, thanks for your feedback - it's very helpful.

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.