[Puppet Users] Re: Issue Installing Puppet on Red Hat6

2012-01-26 Thread joe
You're mixing downloads and system packages.

rpm (thus yum) doesn't recognize that you have rubygems and rake
installed, because it only looks at the package database to determine
that. Right now, you are missing a repo that contains those packages
in your rh6 config, so yum can't find and install them automatically.

Best practice is to download everything, or use only system packages.
Don't try to do both.

RHEL6 has an optional repo that likely contains these packages. Try
enabling it.

On Jan 26, 4:33 pm, Gmoney  wrote:
> I have been trying to follow the bootstrap instructions for installing
> puppet-dashboard. I keep getting error about rubyge(rake) and
> rubygems.  I'd appreciate any help or corrections, thanks in advance.
>
> ruby-libs-1.8.7.299-4.el6.x86_64
> ruby-1.8.7.299-4.el6.x86_64
>
> These are some installation steps I took.
>
> rvm tools rvm-env ruby bash
> rvm install 1.8.7
>
> yum install ruby
>
> downloaded rubygems from:http://rubygems.org/pages/download
>
> gem install rubygems-update
>
> LD_LIBRARY_PATH=/usr/local/rvm/src/ruby-1.8.7-p357:$PATH
> export LD_LIBRARY_PATH
> gem install mysql-2.8.1.gem
>
> install rake:
> git clone g...@github.com:gmoneyice/rake
> cd /root/ruby
> gem install rake
>
> Here is the error:
>
> yum install puppet-dashboard
> Loaded plugins: rhnplugin
> This system is not registered with RHN.
> RHN support will be disabled.
> Setting up Install Process
> Resolving Dependencies
> --> Running transaction check
> ---> Package puppet-dashboard.noarch 0:1.2.4-1.el6 set to be updated
> --> Processing Dependency: ruby-mysql for package: puppet-
> dashboard-1.2.4-1.el6.noarch
> --> Processing Dependency: rubygem(rake) for package: puppet-
> dashboard-1.2.4-1.el6.noarch
> --> Processing Dependency: rubygems for package: puppet-
> dashboard-1.2.4-1.el6.noarch
> --> Running transaction check
> ---> Package puppet-dashboard.noarch 0:1.2.4-1.el6 set to be updated
> --> Processing Dependency: rubygem(rake) for package: puppet-
> dashboard-1.2.4-1.el6.noarch
> --> Processing Dependency: rubygems for package: puppet-
> dashboard-1.2.4-1.el6.noarch
> ---> Package ruby-mysql.x86_64 0:2.8.2-1.el6 set to be updated
> --> Finished Dependency Resolution
> Error: Package: puppet-dashboard-1.2.4-1.el6.noarch (puppetlabs-
> products)
>            Requires: rubygem(rake)
> Error: Package: puppet-dashboard-1.2.4-1.el6.noarch (puppetlabs-
> products)
>            Requires: rubygems
>  You could try using --skip-broken to work around the problem
>  You could try running: rpm -Va --nofiles --nodigest

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



[Puppet Users] Augeas fstab question

2012-02-10 Thread Joe
I'm trying to add a mount option using puppet/augeas. Something like:

class acl {
augeas { "var_fs_acl":
context => "/files/etc/fstab",
changes => ["ins opt after *[file='/var']/
opt[last()]",
"set *[file='/var']/opt[last()] acl"],
onlyif => "match *[file='/var']/opt[.='acl'] size ==
0"
}
}

This works if /var is a filesystem, but fails if /var is not. Since I
can't have two onlyif clauses, I'm not sure how to say:
If /var is a filesystem and
   doesn't already have an opt of acl

Any suggestions would be appreciated.

joe

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



[Puppet Users] Re: template/files - ignoring lines

2012-03-17 Thread joe
See the following:

https://github.com/puppetlabs/puppetlabs-stdlib/tree/master/lib/puppet/provider/file_line

On Mar 16, 6:02 am, jcbollinger  wrote:
> On Mar 15, 7:24 am, Gamon  wrote:
>
> > I'd like to have a template that would contain:
>
> > line1 <%= value1 %>
> > line2 <%= value2 %>
> > line3 <%= value3 %>
>
> > But the template should ignore line2 for example if that already
> > exists. Something like greping for line2 and if that exists, keep the
> > original line.
>
> What you request is not possible, though a similar effect can probably
> be achieved.  Puppet templates are processed on the master to produce
> a single file, then that whole file is transported to wherever the
> manifest says it should go.  There is no way to after the fact adapt
> it to whatever file may be in the target location already.
>
> On the other hand, you can determine in advance what is in the target
> file and communicate it to Puppet via a custom fact. Then your
> template can use the fact value to create whatever the output is that
> you want.
>
> Overall, however, what you are asking runs against Puppet's grain.
> Why shouldn't Puppet know in advance whether line2 should be present,
> and if so, what it should contain?  It is usually better to tell
> Puppet how a node should be configured than to try to make it adapt to
> how the node is already configured.  If you're talking about managing
> a file that is also dynamically modified by some other agent then you
> are asking for trouble.
>
> This whole discussion has been rather abstract, however.  If you can
> be more specific about what you want to do then we may be able to
> offer better advice and / or alternatives.
>
> John

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



[Puppet Users] Facts of other nodes

2012-05-10 Thread Joe
Hello,

I'm trying to figure out the best solution for using facts of other
nodes in manifests.

I understand the use of exported configs and the concat module but, I
think, when using someone's contributed module, unless they wrote the
module using those solutions, I would have to rewrite the module
myself.

Here is the best way I can explain the particular problem I'm running
into. Maybe I'm totally on the wrong path with this.

class my_mysql_server {
  class { 'mysql::server': }
  # other stuff as needed
  # ...
}

node node1.example.com {
  class { 'my_mysql_server': }
}

node node2.example.com {
  class { 'some::app::db':
db_username => 'foo',
db_password => 'password',
db_host => $my_mysql_server::fqdn,
  }
}

In this case, 'some::app' is a contributed module. $db_host in 'db.pp'
simply references a single variable in a template - not a loop and not
using concat.

This does work, but I'm not entirely comfortable with it. For one, if
my_mysql_server is never applied, $fqdn will not be available. This
generally won't happen in the above example, but it's still a concern
I have. Secondly, if I choose to apply my_mysql_server to two nodes,
there would be more than one result for db_host. I'm not exactly sure
how to get around this.

What's the best practice for this type of situation? Should I just
hard-code the fqdn of my_mysql_server and be done with it? Or is there
a more dynamic way to do this?

Thanks,
Joe

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



[Puppet Users] Puppet Subreddit

2011-06-22 Thread JoE
Just letting everyone know that this subreddit exists.

http://www.reddit.com/r/puppet

Enjoy,

-Joe

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



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

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

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

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



[Puppet Users] Puppetmaster filing up /var/log/messages

2010-04-30 Thread JoE
Puppetmaster is filling up /var/log/messages even though logdir is set
to /var/puppet/log/ and masterlog = /var/puppet/log/puppetmaster.log.
There is however no file /var/puppet/log/puppetmaster.log

These are the messages being filled in /var/log/messages:
Apr 30 17:41:44 server puppetmasterd[97213]: Compiled catalog for
client in 0.19 seconds
Apr 30 17:42:24 server puppetmasterd[97213]: Compiled catalog for
client in 0.19 seconds
Apr 30 17:42:39 server puppetmasterd[97213]: Compiled catalog for
client in 0.13 seconds
Apr 30 17:43:01 server puppetmasterd[97213]: Compiled catalog for
client in 0.21 seconds
Apr 30 17:43:19 server puppetmasterd[97213]: Compiled catalog for
client in 0.31 seconds
Apr 30 17:43:33 server puppetmasterd[97213]: Compiled catalog for
client in 0.22 seconds
Apr 30 17:43:39 server puppetmasterd[97213]: Compiled catalog for
client in 0.29 seconds
Apr 30 17:43:41 server puppetmasterd[97213]: Compiled catalog for
client in 0.19 seconds
Apr 30 17:43:42 server puppetmasterd[97213]: Compiled catalog for
client in 0.15 seconds
Apr 30 17:43:55 server puppetmasterd[97213]: Compiled catalog for
client in 0.18 seconds

The names of the hosts have been changed to protect the innocent.

Puppetmaster is version 24.8 and running on FreeBSD 7.2.

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



[Puppet Users] Re: Puppetmaster filing up /var/log/messages

2010-05-03 Thread JoE
I can't find anywhere where the configs are overridden. I was able to
fix the issue by starting puppetmaster with the command:
puppetmasterd -l /var/puppet/log/puppetmaster.log

but it still concerns me that the config file is not read, even if I
point to it directly, by starting it with:
puppetmasterd /usr/local/etc/puppet/puppet.conf

However, if I open it in debug mode, it says:
[r...@server /usr/local/etc/rc.d]# puppetmasterd --no-daemonize --
debug --verbose /usr/local/etc/puppet/puppet.conf
info: Starting server for Puppet version 0.24.8
debug: Creating default schedules
debug: Failed to load library 'ldap' for feature 'ldap'
debug: Failed to load library 'shadow' for feature 'libshadow'
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ca]/File[/
usr/local/etc/puppet/ssl/ca/serial]: Autorequiring File[/usr/local/etc/
puppet/ssl/ca]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[main]/
File[/var/puppet/log]: Autorequiring File[/var/puppet]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ssl]/
File[/usr/local/etc/puppet/ssl/certs/ca.pem]: Autorequiring File[/usr/
local/etc/puppet/ssl/certs]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ssl]/
File[/usr/local/etc/puppet/ssl/public_keys]: Autorequiring File[/usr/
local/etc/puppet/ssl]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ssl]/
File[/usr/local/etc/puppet/ssl/certs/server.pem]: Autorequiring File[/
usr/local/etc/puppet/ssl/certs]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ca]/File[/
usr/local/etc/puppet/ssl/ca/requests]: Autorequiring File[/usr/local/
etc/puppet/ssl/ca]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ca]/File[/
usr/local/etc/puppet/ssl/ca/private]: Autorequiring File[/usr/local/
etc/puppet/ssl/ca]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ca]/File[/
usr/local/etc/puppet/ssl/ca/private/ca.pass]: Autorequiring File[/usr/
local/etc/puppet/ssl/ca/private]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ca]/File[/
usr/local/etc/puppet/ssl/ca]: Autorequiring File[/usr/local/etc/puppet/
ssl]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[main]/
File[/usr/local/etc/puppet/ssl]: Autorequiring File[/usr/local/etc/
puppet]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ssl]/
File[/usr/local/etc/puppet/ssl/private]: Autorequiring File[/usr/local/
etc/puppet/ssl]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ca]/File[/
usr/local/etc/puppet/ssl/ca/signed]: Autorequiring File[/usr/local/etc/
puppet/ssl/ca]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ssl]/
File[/usr/local/etc/puppet/ssl/private_keys/server.pem]: Autorequiring
File[/usr/local/etc/puppet/ssl/private_keys]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ssl]/
File[/usr/local/etc/puppet/ssl/public_keys/server.pem]: Autorequiring
File[/usr/local/etc/puppet/ssl/public_keys]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ca]/File[/
usr/local/etc/puppet/ssl/ca/ca_pub.pem]: Autorequiring File[/usr/local/
etc/puppet/ssl/ca]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ca]/File[/
usr/local/etc/puppet/ssl/ca/ca_crt.pem]: Autorequiring File[/usr/local/
etc/puppet/ssl/ca]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[main]/
File[/var/puppet/state]: Autorequiring File[/var/puppet]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[main]/
File[/var/puppet/lib]: Autorequiring File[/var/puppet]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ssl]/
File[/usr/local/etc/puppet/ssl/private_keys]: Autorequiring File[/usr/
local/etc/puppet/ssl]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ca]/File[/
usr/local/etc/puppet/ssl/ca/ca_key.pem]: Autorequiring File[/usr/local/
etc/puppet/ssl/ca]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ca]/File[/
usr/local/etc/puppet/ssl/ca/inventory.txt]: Autorequiring File[/usr/
local/etc/puppet/ssl/ca]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ssl]/
File[/usr/local/etc/puppet/ssl/certs]: Autorequiring File[/usr/local/
etc/puppet/ssl]
debug: /Settings[/usr/local/etc/puppet/puppet.conf]/Settings[ca]/File[/
usr/local/etc/puppet/ssl/ca/ca_crl.pem]: Autorequiring File[/usr/local/
etc/puppet/ssl/ca]
debug: Finishing transaction 337156560 with 0 changes

So it appears that it is still not reading the line:
masterlog = /var/puppet/log/puppetmaster.log

On Apr 30, 3:04 pm, Peter Meier  wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> > The names of the hosts have been changed to protect the innocent.
>
> > Puppetmaster is version 24.8 and running on FreeBSD 7.2.
>
> can you check how your puppetmaster is started? sometimes init script
> add additional cli parameters which overwrite what the config says.
>
> otherwise: can you try and start the puppetmaster with --debug --verbose
> and see if tells something?
>
> cheers pete
>
> -BEGIN PGP SIGNATU

[Puppet Users] Re: error: Could not intern from pson: source did not contain any PSON!

2011-01-04 Thread joe
I have the same intermittent error, but both the client and server are
on 2.6.4.  Is there any other reason this could happen?

On Dec 6 2010, 3:51 pm, "russell.fulton" 
wrote:
> > This can happen when your client's major version is larger than your 
> > server's major version.  Is that possable?
>
> Indeed!
>
> Thanks -- clients on 2.5 server on 2.6...

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



[Puppet Users] How can I test if source file exists?

2011-06-10 Thread JoE
This is what I would like to do.

define normal_user($fullname, $groups) {
$username = $name
user { "$username" :
ensure  => present,
allowdupe   => false,
shell   => '/bin/bash',
home=> "/home/${username}",
gid => $username,
groups  => $groups,
comment => $fullname,
managehome  => true,
}

if exists("puppet://modules/users/${username}.bashrc") { # This is
the important line
file { "/home/${username}/.bashrc":
ensure => present,
source => "puppet://modules/users/${username}.bashrc"
}
}

normal_user { "joe":
fullname => "Joe Hillenbrand",
groups => ["admin"]
}

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



[Puppet Users] Re: Puppet tutorial (and talk)

2009-10-22 Thread joe

There doesn't seem to be any mention of cert signing...

On Oct 22, 1:48 pm, John Arundel  wrote:
> Hi,
>
> I recently wrote a blog post for absolute beginners with Puppet,
> hopefully the first in a tutorial series called 'Powering Up With
> Puppet'. I'd be grateful for some feedback on it, both from beginners
> (to let me know if it helps them) and from the experts here (to point
> out my mistakes).
>
> http://bitfieldconsulting.com/puppet-tutorial
>
> I'm also giving a talk on Puppet at the November LRUG meeting in
> London (http://lrug.org/) if anyone's interested in coming along to
> that - the now-legendary Julian Simpson will also be talking about
> Puppet, and at the end we'll fight bare-chested in a cage, or
> something.
>
> Regards,
> John
> --http://bitfieldconsulting.comhttp://twitter.com/bitfield
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] After generating puppet.conf, puppetd just echos the new file.

2009-11-03 Thread JoE

I am running puppet 0.24.8 on FreeBSD.

When I run,
puppetd --genconfig > /usr/local/etc/puppet/puppet.conf

running commands like

puppetd --genmanifest > /usr/local/etc/puppet/manifests/site.pp

then site.pp will just be filled with puppet.conf.

But if I remove puppet.conf, then generating site.pp will result in it
creating the proper site.pp file.

Am I doing something wrong?

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



[Puppet Users] Firewall between master and client?

2009-11-19 Thread JoE
I understand that puppet needs port 8140 tcp/udp open for server and
client.

Will puppet work if a firewall is set up between these two hosts that
only allows traffic from the server to the client (server -> client),
or is two communication required?

Thanks for the help,

-JoE

--

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




[Puppet Users] Run a script when it has been changed.

2010-01-13 Thread JoE
Hi all,

Currently I am trying to have a script run whenever a change is made
to it. Here is an example of when my configurations look like:

file { "/usr/bin/data/":
owner => "rot",
group => "wheel",
mode => "755",
purge   => true,
recurse => true,
source => "puppet://puppet/data/bin/";
}

exec { "/usr/bin/data/get-data.sh restart":
subscribe => "/usr/bin/data/get-data.sh",
refreshonly => true;
}

The script is contained in /usr/bin/data/ which is managed by Puppet.
But when I try to run this I get the following error:

err: Could not create /usr/bin/data/get_data.sh restart: Parameter
subscribe failed: Relationships must be resource references at /usr/
local/etc/puppet/modules/data/manifests/init.pp:237
warning: Not using cache on failed catalog
warning: Configuration could not be instantiated: Parameter subscribe
failed: Relationships must be resource references at /usr/local/etc/
puppet/modules/data/manifests/init.pp:23

Is there a way to have a script subscribe to itself?

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




[Puppet Users] Re: Run a script when it has been changed.

2010-01-14 Thread JoE

Yeah, that is what is actually in my file. I had to change the names
to protect the innocent, and I made some mistakes while doing that.
Here is a more accurate look at what I am working on:

class data {

}

define get-data() {

file { "/usr/bin/data":
   ensure => directory,
   owner => "root",
   group => "wheel",
   mode => "755",
   purge   => true,
   recurse => true,
   source => "puppet://puppet/data/bin/";
}

exec { "/usr/bin/data/get-data.sh restart":
   subscribe => File["/usr/bin/data/get-data.sh"],
   refreshonly => true;
}
}

I also copied the wrong error message. (I really shouldn't write
emails at the end of the day. =P )

warning: Not using cache on failed catalog
warning: Configuration could not be instantiated: Could not find
dependency File[/usr/bin/data/get-data.sh] for Exec[/usr/bin/data/get-
data.sh restart] at /usr/local/etc/puppet/modules/data/manifests/
init.pp:238

So, yeah, that doesn't work.

I tried subscribing to the directory and it does work. Though, I don't
necessarily want to subscribe to the directory if I can avoid it
because some other files in there may change and I might not want to
restart the script then.

Sorry for the confusion earlier.

On Jan 13, 5:35 pm, Dan Bode  wrote:
> On Wed, Jan 13, 2010 at 1:24 PM, JoE  wrote:
> > Hi all,
>
> > Currently I am trying to have a script run whenever a change is made
> > to it. Here is an example of when my configurations look like:
>
> > file { "/usr/bin/data/":
> >        owner => "rot",
> >        group => "wheel",
> >        mode => "755",
> >        purge   => true,
> >        recurse => true,
> >        source => "puppet://puppet/data/bin/";
> > }
>
> > exec { "/usr/bin/data/get-data.sh restart":
> >        subscribe => "/usr/bin/data/get-data.sh",
> >        refreshonly => true;
> > }
>
> try with a resource reference.
>
> the syntax is:
>
> File['/usr/bin/data/get-data.sh']
>
> I am not 100% sure this will work, you may have to subscribe to the dir (let
> me know :)
>
>
>
> > The script is contained in /usr/bin/data/ which is managed by Puppet.
> > But when I try to run this I get the following error:
>
> > err: Could not create /usr/bin/data/get_data.sh restart: Parameter
> > subscribe failed: Relationships must be resource references at /usr/
> > local/etc/puppet/modules/data/manifests/init.pp:237
> > warning: Not using cache on failed catalog
> > warning: Configuration could not be instantiated: Parameter subscribe
> > failed: Relationships must be resource references at /usr/local/etc/
> > puppet/modules/data/manifests/init.pp:23
>
> > Is there a way to have a script subscribe to itself?
>
> > Thank you for you help.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Puppet Users" group.
> > To post to this group, send email to puppet-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > puppet-users+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/puppet-users?hl=en.
-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




[Puppet Users] Re: Run a script when it has been changed.

2010-01-14 Thread JoE
What is interesting is that this will not work even if "get-data.sh"
is already in "/usr/bin/data". Is this a bug?

On Jan 14, 9:57 am, JoE  wrote:
> Yeah, that is what is actually in my file. I had to change the names
> to protect the innocent, and I made some mistakes while doing that.
> Here is a more accurate look at what I am working on:
>
> class data {
>
> }
>
> define get-data() {
>
>         file { "/usr/bin/data":
>            ensure => directory,
>            owner => "root",
>            group => "wheel",
>            mode => "755",
>            purge   => true,
>            recurse => true,
>            source => "puppet://puppet/data/bin/";
>     }
>
>         exec { "/usr/bin/data/get-data.sh restart":
>                    subscribe => File["/usr/bin/data/get-data.sh"],
>                    refreshonly => true;
>         }
>
> }
>
> I also copied the wrong error message. (I really shouldn't write
> emails at the end of the day. =P )
>
> warning: Not using cache on failed catalog
> warning: Configuration could not be instantiated: Could not find
> dependency File[/usr/bin/data/get-data.sh] for Exec[/usr/bin/data/get-
> data.sh restart] at /usr/local/etc/puppet/modules/data/manifests/
> init.pp:238
>
> So, yeah, that doesn't work.
>
> I tried subscribing to the directory and it does work. Though, I don't
> necessarily want to subscribe to the directory if I can avoid it
> because some other files in there may change and I might not want to
> restart the script then.
>
> Sorry for the confusion earlier.
>
> On Jan 13, 5:35 pm, Dan Bode  wrote:
>
> > On Wed, Jan 13, 2010 at 1:24 PM, JoE  wrote:
> > > Hi all,
>
> > > Currently I am trying to have a script run whenever a change is made
> > > to it. Here is an example of when my configurations look like:
>
> > > file { "/usr/bin/data/":
> > >        owner => "rot",
> > >        group => "wheel",
> > >        mode => "755",
> > >        purge   => true,
> > >        recurse => true,
> > >        source => "puppet://puppet/data/bin/";
> > > }
>
> > > exec { "/usr/bin/data/get-data.sh restart":
> > >        subscribe => "/usr/bin/data/get-data.sh",
> > >        refreshonly => true;
> > > }
>
> > try with a resource reference.
>
> > the syntax is:
>
> > File['/usr/bin/data/get-data.sh']
>
> > I am not 100% sure this will work, you may have to subscribe to the dir (let
> > me know :)
>
> > > The script is contained in /usr/bin/data/ which is managed by Puppet.
> > > But when I try to run this I get the following error:
>
> > > err: Could not create /usr/bin/data/get_data.sh restart: Parameter
> > > subscribe failed: Relationships must be resource references at /usr/
> > > local/etc/puppet/modules/data/manifests/init.pp:237
> > > warning: Not using cache on failed catalog
> > > warning: Configuration could not be instantiated: Parameter subscribe
> > > failed: Relationships must be resource references at /usr/local/etc/
> > > puppet/modules/data/manifests/init.pp:23
>
> > > Is there a way to have a script subscribe to itself?
>
> > > Thank you for you help.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Puppet Users" group.
> > > To post to this group, send email to puppet-us...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > puppet-users+unsubscr...@googlegroups.com
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/puppet-users?hl=en.
-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




[Puppet Users] Re: Run a script when it has been changed.

2010-01-14 Thread JoE
Nevermind, I solved the problem. The file needs to be explicitly
mentioned even though it is already in /usr/bin/data, see the code
below:

define get-data() {

file { "/usr/bin/data":
   owner => "root",
   group => "wheel",
   mode => "755",
   purge   => true,
   recurse => true,
   source => "puppet://puppet/data/bin/";
}

file { "/usr/bin/data/get-data.sh":
   owner => "root",
   group => "wheel",
   mode => "755",
   source => "puppet://puppet/data/bin/get-data.sh";
}

exec { "/usr/bin/data/get-data.sh restart":
   subscribe => File["/usr/bin/data/get-data.sh"],
   refreshonly => true;
}
}

Now, everything works as it should and the script only runs when it is
supposed to.

Thanks for the help.

On Jan 14, 9:59 am, JoE  wrote:
> What is interesting is that this will not work even if "get-data.sh"
> is already in "/usr/bin/data". Is this a bug?
>
> On Jan 14, 9:57 am, JoE  wrote:
>
> > Yeah, that is what is actually in my file. I had to change the names
> > to protect the innocent, and I made some mistakes while doing that.
> > Here is a more accurate look at what I am working on:
>
> > class data {
>
> > }
>
> > define get-data() {
>
> >         file { "/usr/bin/data":
> >            ensure => directory,
> >            owner => "root",
> >            group => "wheel",
> >            mode => "755",
> >            purge   => true,
> >            recurse => true,
> >            source => "puppet://puppet/data/bin/";
> >     }
>
> >         exec { "/usr/bin/data/get-data.sh restart":
> >                    subscribe => File["/usr/bin/data/get-data.sh"],
> >                    refreshonly => true;
> >         }
>
> > }
>
> > I also copied the wrong error message. (I really shouldn't write
> > emails at the end of the day. =P )
>
> > warning: Not using cache on failed catalog
> > warning: Configuration could not be instantiated: Could not find
> > dependency File[/usr/bin/data/get-data.sh] for Exec[/usr/bin/data/get-
> > data.sh restart] at /usr/local/etc/puppet/modules/data/manifests/
> > init.pp:238
>
> > So, yeah, that doesn't work.
>
> > I tried subscribing to the directory and it does work. Though, I don't
> > necessarily want to subscribe to the directory if I can avoid it
> > because some other files in there may change and I might not want to
> > restart the script then.
>
> > Sorry for the confusion earlier.
>
> > On Jan 13, 5:35 pm, Dan Bode  wrote:
>
> > > On Wed, Jan 13, 2010 at 1:24 PM, JoE  wrote:
> > > > Hi all,
>
> > > > Currently I am trying to have a script run whenever a change is made
> > > > to it. Here is an example of when my configurations look like:
>
> > > > file { "/usr/bin/data/":
> > > >        owner => "rot",
> > > >        group => "wheel",
> > > >        mode => "755",
> > > >        purge   => true,
> > > >        recurse => true,
> > > >        source => "puppet://puppet/data/bin/";
> > > > }
>
> > > > exec { "/usr/bin/data/get-data.sh restart":
> > > >        subscribe => "/usr/bin/data/get-data.sh",
> > > >        refreshonly => true;
> > > > }
>
> > > try with a resource reference.
>
> > > the syntax is:
>
> > > File['/usr/bin/data/get-data.sh']
>
> > > I am not 100% sure this will work, you may have to subscribe to the dir 
> > > (let
> > > me know :)
>
> > > > The script is contained in /usr/bin/data/ which is managed by Puppet.
> > > > But when I try to run this I get the following error:
>
> > > > err: Could not create /usr/bin/data/get_data.sh restart: Parameter
> > > > subscribe failed: Relationships must be resource references at /usr/
> > > > local/etc/puppet/modules/data/manifests/init.pp:237
> > > > warning: Not using cache on failed catalog
> > > > warning: Configuration could not be instantiated: Parameter subscribe
> > > > failed: Relationships must be resource references at /usr/local/etc/
> > > > puppet/modules/data/manifests/init.pp:23
>
> > > > Is there a way to have a script subscribe to itself?
>
> > > > Thank you for you help.
>
> > > > --
> > > > You received this message because you are subscribed to the Google 
> > > > Groups
> > > > "Puppet Users" group.
> > > > To post to this group, send email to puppet-us...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > puppet-users+unsubscr...@googlegroups.com
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/puppet-users?hl=en.
-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




[Puppet Users] Re: Run a script when it has been changed.

2010-01-14 Thread JoE
>You're missing things from there. You have a file{} resource for the
>directory /usr/bin/data but no definition for the get-data.sh within it.
>The file itself needs to be managed by puppet before you can subscribe
>to it. Add a file {"/usr/bin/data/get-data.sh"} definition.

I should have refreshed the discussion before sending...

On Jan 14, 10:38 am, JoE  wrote:
> Nevermind, I solved the problem. The file needs to be explicitly
> mentioned even though it is already in /usr/bin/data, see the code
> below:
>
> define get-data() {
>
>         file { "/usr/bin/data":
>            owner => "root",
>            group => "wheel",
>            mode => "755",
>            purge   => true,
>            recurse => true,
>            source => "puppet://puppet/data/bin/";
>     }
>
>     file { "/usr/bin/data/get-data.sh":
>            owner => "root",
>            group => "wheel",
>            mode => "755",
>            source => "puppet://puppet/data/bin/get-data.sh";
>     }
>
>         exec { "/usr/bin/data/get-data.sh restart":
>                    subscribe => File["/usr/bin/data/get-data.sh"],
>                    refreshonly => true;
>         }
>
> }
>
> Now, everything works as it should and the script only runs when it is
> supposed to.
>
> Thanks for the help.
>
> On Jan 14, 9:59 am, JoE  wrote:
>
> > What is interesting is that this will not work even if "get-data.sh"
> > is already in "/usr/bin/data". Is this a bug?
>
> > On Jan 14, 9:57 am, JoE  wrote:
>
> > > Yeah, that is what is actually in my file. I had to change the names
> > > to protect the innocent, and I made some mistakes while doing that.
> > > Here is a more accurate look at what I am working on:
>
> > > class data {
>
> > > }
>
> > > define get-data() {
>
> > >         file { "/usr/bin/data":
> > >            ensure => directory,
> > >            owner => "root",
> > >            group => "wheel",
> > >            mode => "755",
> > >            purge   => true,
> > >            recurse => true,
> > >            source => "puppet://puppet/data/bin/";
> > >     }
>
> > >         exec { "/usr/bin/data/get-data.sh restart":
> > >                    subscribe => File["/usr/bin/data/get-data.sh"],
> > >                    refreshonly => true;
> > >         }
>
> > > }
>
> > > I also copied the wrong error message. (I really shouldn't write
> > > emails at the end of the day. =P )
>
> > > warning: Not using cache on failed catalog
> > > warning: Configuration could not be instantiated: Could not find
> > > dependency File[/usr/bin/data/get-data.sh] for Exec[/usr/bin/data/get-
> > > data.sh restart] at /usr/local/etc/puppet/modules/data/manifests/
> > > init.pp:238
>
> > > So, yeah, that doesn't work.
>
> > > I tried subscribing to the directory and it does work. Though, I don't
> > > necessarily want to subscribe to the directory if I can avoid it
> > > because some other files in there may change and I might not want to
> > > restart the script then.
>
> > > Sorry for the confusion earlier.
>
> > > On Jan 13, 5:35 pm, Dan Bode  wrote:
>
> > > > On Wed, Jan 13, 2010 at 1:24 PM, JoE  wrote:
> > > > > Hi all,
>
> > > > > Currently I am trying to have a script run whenever a change is made
> > > > > to it. Here is an example of when my configurations look like:
>
> > > > > file { "/usr/bin/data/":
> > > > >        owner => "rot",
> > > > >        group => "wheel",
> > > > >        mode => "755",
> > > > >        purge   => true,
> > > > >        recurse => true,
> > > > >        source => "puppet://puppet/data/bin/";
> > > > > }
>
> > > > > exec { "/usr/bin/data/get-data.sh restart":
> > > > >        subscribe => "/usr/bin/data/get-data.sh",
> > > > >        refreshonly => true;
> > > > > }
>
> > > > try with a resource reference.
>
> > > > the syntax is:
>
> > > > File[

[Puppet Users] Re: Git vs SVN?

2010-01-14 Thread JoE
You can even use git for an svn style workflow. For example, at my
work, we have a local git repo for managing puppet configs, and then
we periodically push those out to a backup server.

git push ssh://backup.server/path/to/puppet/repo.git

You can even use git with an already existing svn server.
See http://andy.delcambre.com/2008/03/04/git-svn-workflow.html
but why do that when you can just use git all around.

So in the question of "svn or git?" the answer is always git!


On Jan 14, 8:42 am, James Turnbull  wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 15/01/10 12:36 AM, James Turnbull wrote:
>
> > > On 15/01/10 12:30 AM, SyRenity wrote:
>
> >> >> Thanks for sharing. How do you achieve centralization of all
> multiple
> >> >> git repos, in case you have several puppetmasters?
>
> > > I don't - I have one central Git repo with multiple branches
> > > matching my environments:
>
> I should have been clearer here - I maintain one central git repo
> and check out branches to multiple puppetmasters.
>
> > > $ git branch
> > > * master -> which is production
> > > staging
> > > testing
> > > development
> > > scrapyard
> > > puppetbook
> > > puppetbook2
>
> For example production, staging, testing and development are
> environments on one master.  The Puppet book branches are checked
> out to another master and the scrapyard has bits and pieces that I
> use for testing and gets checked out in a few places.
>
> Regards
>
> James Turnbull
>
> - --
> Author of:
> * Pro Linux System Administration (http://tinyurl.com/linuxadmin)
> * Pulling Strings with Puppet (http://tinyurl.com/pupbook)
> * Pro Nagios 2.0 (http://tinyurl.com/pronagios)
> * Hardening Linux (http://tinyurl.com/hardeninglinux)
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.7 (Darwin)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/
>
> iQEVAwUBS08fVSFa/lDkFHAyAQLMrwgAxn79MP67SmGrvkRgbHOGXuLuhC5CcZHk
> NL51aLgZ6UCzY6+bNfuoo+OmC0yGiVn0mkizQePbL6SWuwMRU+obyYJONV6y803v
> FLv1GVwBEwUoGuFMJDY70OXq7o74xZN93CI62GHoKJqaTa4FP8m+rZRBlC9y3n8x
> 2k5W4T0XuAvj+dD+QZlTcC5xsRp5nmSyVo7CzjlxZp1yxnHa3Ymipm74qouwiji+
> 5W/FWJS3Yi3dgct9wAtg4Ge9mhJytbz9g2gefGMP6EINq04eiAz1v3SfDD7UNGOB
> iIw/BpUUWKAa8vLQqr8YHe7r+NjaCZwoiJUWHVgMfB4cXJ46QaBuEQ==
> =0wfV
> -END PGP SIGNATURE-
-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.




[Puppet Users] Re: Job Listing - Linux Admin in Boulder, CO

2012-08-17 Thread joe
If I lived on that side of town, I'd be interested, but where I live now 
that commute would be terrible.

On Friday, August 17, 2012 3:13:54 PM UTC-6, guymatz wrote:
>
> It's not a telecommute position.  No relocation possible.  Sorry for 
> having not been explicit about that.
>
> And sorry for not giving more details earlier.  The job is for a senior 
> RedHat Linux DevOps, WWW Admin, NetApp, VMware, etc.
>
> Thanks,
> Guy
>
> On Fri, Aug 17, 2012 at 11:36 AM, Guy Matz 
> > wrote:
>
>> Anyone interested?
>>
>> Thanks,
>> Guy 
>>
>> guymatz at gmail
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/IXzD2XIV-ooJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: inconsistencies with arrays: want multiple requires

2012-11-19 Thread joe
I think you misunderstand what puppet is doing there. Variables are not a 
literal character replacement, they have types.

I think what you want is 

require => Package[$pkglist]

The [] in your variable assignment tells puppet it is an array.

The [] in the Package example I provided tells puppet you are referring to 
packages that have already been defined and not trying to change the 
Package type's defaults. 

On Monday, November 19, 2012 4:45:55 PM UTC-7, Philip Brown wrote:
>
> I've poked around the puppet docs, and google, and so far I'm stuck on an 
> apparent inconsistency of usage, when it comes to using arrays, and 
> variables, interchangably.
> I should mention this is with puppet 3.0.1
>
> If you use literal arrays, both of the following are possible and accepted 
> by puppet:
>
> package{ ['pkg1', 'pkg2']: 
>   blahblah
> }
>
> service{ foo:
>  require => Package['pkg1', 'pkg2'],
> }
>
>
> However.  If I define a variable, 
> $pkglist=['pkg1','pkg2']
>
> Then, while I CAN do
> package{ $pkglist:
>   blahblah
> }
>
> It seems I cannot do
>
> service{ foo:
>   require => Package $pkglist ,
> }
>
> This makes me sad :(
> Can someone tell if if there is some language shenanigans I must do, to 
> get puppet to accept the last bit?
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/h8Kx08grxvcJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: How do you install a yum repo?

2012-11-20 Thread joe
Also, there is a much simpler way using your original approach. The Package 
type has a provider parameter that can be set to rpm. So instead of an 
exec, you just have a package resource that installs that rpm.

You should also look into the unless parameter to exec. It runs a command 
to determine if the exec needs to be run or not.


On Tuesday, November 20, 2012 3:02:58 PM UTC-7, Stephen Price wrote:
>
> Cool, cool. If I'm installing a repo for the first time, I usually install 
> the rpm manually on a test machine, then grab the .repo file from 
> /etc/yum.repos.d and the referenced gpgkey, and add everything in Puppet 
> with a custom define (which is really a wrapper around yumrepo with the 
> additional file resource I mentioned). Makes upgrading the repo a manual 
> process, but gives you more control.
>
> On Tuesday, November 20, 2012 1:56:51 PM UTC-8, Laurence Cope wrote:
>>
>> thanks for all that. The examples above look like some I found online 
>> (not specific to Virtualmin) which failed with errors. but maybe there were 
>> slight differences. I am off work for couple of days now, so will try these 
>> when I get back. I really appreciate it. you can tell I am new, once I get 
>> over these few hurdles I am sure I will be fine. 
>>
>> @stephen yes I agree, I just wanted to cut it out until I got the rest 
>> working, one less thing that may cause errors! one step at a time :)
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/oIs6COHmpCUJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: new user - understanding arrays as variables in defined types

2012-11-20 Thread joe
Nothing wrong with that. It's a very common practice.

One thing I would recommend is setting your array to a variable and passing 
that variable to the define. It just makes your code cleaner and easier to 
read:

node 'mynode' {
  include firewall
  $sources = ['node1', 'node2']
  myfirewall::accept { $sources :
proto => 'tcp',
port  => '80'
  }


On Tuesday, November 20, 2012 2:30:45 PM UTC-7, Dusty Doris wrote:
>
>
>
> On Tuesday, November 20, 2012 3:51:07 PM UTC-5, Dusty Doris wrote:
>>
>> Lets say I wanted to make a declared type for adding custom firewall 
>> rules on a per-node basis.
>>
>>
>> define myfirewall::accept($proto, $port, $sources=[]) {
>>   include defaultfirewall
>>
>>   $sources.each do |source|
>> 
>> firewall { "100 allow $proto $port for $source":
>>   proto  => $proto,
>>   dport => $dport,
>>   source => $source,
>>   action   => 'accept',
>> }
>>
>>   end
>> }
>>
>> I could use it something like this:
>>
>> node "mynode" {
>>   myfirewall:: accept { "http": 
>> proto => 'tcp',
>> port   => '80',
>> sources => ['1.1.1.1','2.2.2.2']
>>   }
>> }
>>
>>
>> Is there any way to do something like this with puppet?  I'm new to this 
>> and quite confused.
>>
>>
>>
> aha.  I found I can do it using the $name parameter.
>
> Is there anything inherently wrong with this type of usage?
>
>
> define myfirewall::accept($proto, $port) {
>
>   firewall { "100 $name $proto $port":
> proto => $proto,
> dport => $port,
> source => $name,
> action => 'accept'
>   }
>
> } 
>
> node 'mynode' {
>   include firewall
>   myfirewall::accept { ['node1', 'node2'] :
> proto => 'tcp',
> port  => '80'
>   }
> }
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/acxmlDAEJoUJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: subscribe => Package

2012-11-27 Thread joe
Instead of subscribe => Package, it's require => Package['toola'] or 
similar.

If you want to make sure all three packages are installed before the file, 
the best thing in this situation is to order the classes.

Either in a separate module altogether or somewhere that makes sense for 
you (perhaps the base class of this module), declare the classes in the 
order you need:

Class['install'] -> Class['configure']

This will make sure all resources in class install get applied before any 
resources in class configure.

On Tuesday, November 27, 2012 9:07:53 AM UTC-7, ureal frank wrote:
>
>  Hi there, 
>
> I've defined a package array to install some software this way:
>
> class install {
> <…>
> package { ['toola','toolb','toolc']:
>   ensure => installed,
>   require => Class['setup'],
>   notify => Class['configure']
> }
> <….>
> }
>
> then under configure class I have something that is dependent of toola to 
> install,
>
> class configure {
> file { '/etc/toola':
>   content => "test"
> }
> }
>
> Maybe I'm doing this notify/subscribe thing in the wrong way because 
> sometimes Puppet tries the configure class first before install class. Even 
> so…
>
> 
> Is there a way for me to force this dependency under file { '/etc/toola': 
> subscribe => Package?
> If yes, how can I define such a dependency with class Package after I've 
> defined an package array without a specific name?
>
> Cheers
> -- 
> Frank
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/q0HIOrYvr2cJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Is it possible to run functions at run time ?

2012-11-27 Thread joe
What you should do instead is set the path based on the value of 
$myclass::provider.

if $myclass::provider == 'package' {


On Tuesday, November 27, 2012 3:58:05 PM UTC-7, Yanis Guenane wrote:
>
> *Specification* : my manifest look more like this
>
> class myclass ($provider = 'package') {
>   case $provider {
> 'package' : {
>   package {'mypackage' :
> ensure => latest,
>   }
> }
> 'source' : {
>   exec {'install procedure' :
>  }
>}
> }
>
> define myclass::mydefine() {
>   $test = get_test_path()
>
>   file {'myconf' :
> content => templates('mod/myconf'),
>   }
> }
>
>
> On Tuesday, November 27, 2012 11:23:50 PM UTC+1, Yanis Guenane wrote:
>>
>> Hi all,
>>
>> I have a manifest that look like this 
>>
>> case $provider {
>>   'package' : {
>> package {'mypackage' :
>>   ensure => latest,
>> }
>>   }
>>   'source' : {
>>  exec {'install procedure' :
>>  }
>>}
>>
>> $test = get_test_path()
>>
>> file {'myconf' :
>>content => templates('mod/myconf'),
>> }
>>
>> Within mycon template I have a variable 'test' that depending if the 
>> package was installed from source of from the package will have a different 
>> path.
>> Issue is that the function get_test_path() seems to be done at compile 
>> time, so the first time I run it will always result in an erroneous answer. 
>> After a second run it will be fine.
>>
>> Does any one can provide guidance on how I could make it work at the 
>> first run ?
>>
>> Thank you,
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/ne0VVEvq-VMJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: Is it possible to run functions at run time ?

2012-11-27 Thread joe
You should set the path based on the value of $myclass::provider:

if $myclass::provider == 'package' {
  test = '/path/a'
} 
else {
  test = '/path/b'
}

On Tuesday, November 27, 2012 3:58:05 PM UTC-7, Yanis Guenane wrote:
>
> *Specification* : my manifest look more like this
>
> class myclass ($provider = 'package') {
>   case $provider {
> 'package' : {
>   package {'mypackage' :
> ensure => latest,
>   }
> }
> 'source' : {
>   exec {'install procedure' :
>  }
>}
> }
>
> define myclass::mydefine() {
>   $test = get_test_path()
>
>   file {'myconf' :
> content => templates('mod/myconf'),
>   }
> }
>
>
> On Tuesday, November 27, 2012 11:23:50 PM UTC+1, Yanis Guenane wrote:
>>
>> Hi all,
>>
>> I have a manifest that look like this 
>>
>> case $provider {
>>   'package' : {
>> package {'mypackage' :
>>   ensure => latest,
>> }
>>   }
>>   'source' : {
>>  exec {'install procedure' :
>>  }
>>}
>>
>> $test = get_test_path()
>>
>> file {'myconf' :
>>content => templates('mod/myconf'),
>> }
>>
>> Within mycon template I have a variable 'test' that depending if the 
>> package was installed from source of from the package will have a different 
>> path.
>> Issue is that the function get_test_path() seems to be done at compile 
>> time, so the first time I run it will always result in an erroneous answer. 
>> After a second run it will be fine.
>>
>> Does any one can provide guidance on how I could make it work at the 
>> first run ?
>>
>> Thank you,
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/hMQYjwpofeIJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: wildcards in file type?

2008-11-06 Thread joe

I'm having a similar issue that that wiki entry does not directly
address.

I'm trying to do a subscribe on a file definition that is a directory.

I have ensure => directory and recurse => true.

I do not use puppet to source the files (they are on nfs shared to all
servers that use them).

Puppet will not restart a service subscribed to this file definition.
It does not seem to look at whether the files in the directory have
changed.

How do others make such a scenario work?

Thanks

On Nov 5, 1:55 pm, Arnau Bria <[EMAIL PROTECTED]> wrote:
> On Wed, 05 Nov 2008 18:48:12 +0100
>
> Peter Meier wrote:
>
> [...]
>
> >http://reductivelabs.com/trac/puppet/wiki/FrequentlyAskedQuestions#ho...
>
> my god, I did some search on the wiki, but did not find that link.
>
> many thanks!
>
> > greets pete
>
> Arnau

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



[Puppet Users] Re: wildcards in file type?

2008-11-06 Thread joe

It's a defined file resource without a source parameter.  Here is the
syntax:

file { "/opt/management/dns/zones":
owner => "root",
group => "root",
mode => "644",
ensure => directory,
recurse => true }

Then there is a service resource that subscribes to that file:

service { "named":
enable => true,
ensure => running,
require => File["/etc/named.conf"],
require => File["/opt/dns/management/zones"],
require => Package["bind"],
subscribe => File["/etc/named.conf"],
subscribe => File["/opt/management/dns/zones"] }

But the service never restarts when files in that directory change. I
would think it's because I'm not sourcing those files, but I'm not
sure.

On Nov 6, 12:37 pm, "Evan Hisey" <[EMAIL PROTECTED]> wrote:
> On Wed, Nov 5, 2008 at 6:19 PM, joe <[EMAIL PROTECTED]> wrote:
>
> > I'm having a similar issue that that wiki entry does not directly
> > address.
>
> > I'm trying to do a subscribe on a file definition that is a directory.
>
> > I have ensure => directory and recurse => true.
>
> > I do not use puppet to source the files (they are on nfs shared to all
> > servers that use them).
>
> > Puppet will not restart a service subscribed to this file definition.
> > It does not seem to look at whether the files in the directory have
> > changed.
>
> > How do others make such a scenario work?
>
> > Thanks
>
> Is puppet actually managing the directory? Unless puppet manages the
> directory it can't know to handle a restart.
>
> Evan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: wildcards in file type?

2008-11-06 Thread joe

I just added the require after subscribe alone didn't work.

I thought that if I specified the directory with recurse => true, it
would monitor all the files in the directory as well.

Is there a way to have puppet monitor files it isn't sourcing?

On Nov 6, 3:41 pm, Aj <[EMAIL PROTECTED]> wrote:
> This notification will only fire if the managed parameters for the  
> directory are out of sync, e.g. Owner/group/modes/file type (link,  
> file).
>
> Subscribe also implies require, FYI =)
>
> On 7/11/2008, at 8:38 AM, joe <[EMAIL PROTECTED]> wrote:
>
>
>
> > It's a defined file resource without a source parameter.  Here is the
> > syntax:
>
> > file { "/opt/management/dns/zones":
> >                owner => "root",
> >                group => "root",
> >                mode => "644",
> >                ensure => directory,
> >                recurse => true }
>
> > Then there is a service resource that subscribes to that file:
>
> > service { "named":
> >                enable => true,
> >                ensure => running,
> >                require => File["/etc/named.conf"],
> >                require => File["/opt/dns/management/zones"],
> >                require => Package["bind"],
> >                subscribe => File["/etc/named.conf"],
> >                subscribe => File["/opt/management/dns/zones"] }
>
> > But the service never restarts when files in that directory change. I
> > would think it's because I'm not sourcing those files, but I'm not
> > sure.
>
> > On Nov 6, 12:37 pm, "Evan Hisey" <[EMAIL PROTECTED]> wrote:
> >> On Wed, Nov 5, 2008 at 6:19 PM, joe <[EMAIL PROTECTED]> wrote:
>
> >>> I'm having a similar issue that that wiki entry does not directly
> >>> address.
>
> >>> I'm trying to do a subscribe on a file definition that is a  
> >>> directory.
>
> >>> I have ensure => directory and recurse => true.
>
> >>> I do not use puppet to source the files (they are on nfs shared to  
> >>> all
> >>> servers that use them).
>
> >>> Puppet will not restart a service subscribed to this file  
> >>> definition.
> >>> It does not seem to look at whether the files in the directory have
> >>> changed.
>
> >>> How do others make such a scenario work?
>
> >>> Thanks
>
> >> Is puppet actually managing the directory? Unless puppet manages the
> >> directory it can't know to handle a restart.
>
> >> Evan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: wildcards in file type?

2008-11-07 Thread joe

This is interesting.  What you describe does work, but it appears
there's a bug somewhere.  I'm getting 2 reasons to bounce the service
out of the single file definition when checksum is mtime.  Here is the
output:

# puppetd --test
info: Caching catalog at /var/lib/puppet/localconfig.yaml
notice: Starting catalog run
notice: //Node[removed]/dns/File[/opt/management/dns/zones]/checksum:
checksum changed '{mtime}Fri Nov 07 15:46:17 -0500 2008' to
'{mtime}Fri Nov 07 15:47:02 -0500 2008'
notice: //Node[removed]/dns/File[/opt/management/dns/zones/removed-
ext.zone]/checksum: checksum changed '{mtime}Fri Nov 07 15:46:17 -0500
2008' to '{mtime}Fri Nov 07 15:47:02 -0500 2008'
info: //Node[removed]/dns/File[/opt/management/dns/zones]: Scheduling
refresh of Service[named]
info: //Node[removed]/dns/File[/opt/management/dns/zones]: Scheduling
refresh of Service[named]
notice: //Node[removed]/dns/Service[named]: Triggering 'refresh' from
2 dependencies
notice: Finished catalog run in 6.72 seconds

It appears from this output that puppet should be checksumming files
on recurse => true regardless of the checksumming scheme.  Is this a
bug?

On Nov 7, 3:11 pm, "Paul Lathrop" <[EMAIL PROTECTED]> wrote:
> Wrong. Set the checksum property to "mtime" on the directory resource.
> When a file in the directory changes, it will change the mtime of the
> directory which will trigger an event on any resources which subscribe
> to the directory.
>
> I have used this method a number of times to great success.
>
> --Paul
>
> On Thu, Nov 6, 2008 at 6:03 PM, Aj <[EMAIL PROTECTED]> wrote:
>
> > No, there is no way.
>
> > On 7/11/2008, at 1:01 PM, joe <[EMAIL PROTECTED]> wrote:
>
> >> I just added the require after subscribe alone didn't work.
>
> >> I thought that if I specified the directory with recurse => true, it
> >> would monitor all the files in the directory as well.
>
> >> Is there a way to have puppet monitor files it isn't sourcing?
>
> >> On Nov 6, 3:41 pm, Aj <[EMAIL PROTECTED]> wrote:
> >>> This notification will only fire if the managed parameters for the
> >>> directory are out of sync, e.g. Owner/group/modes/file type (link,
> >>> file).
>
> >>> Subscribe also implies require, FYI =)
>
> >>> On 7/11/2008, at 8:38 AM, joe <[EMAIL PROTECTED]> wrote:
>
> >>>> It's a defined file resource without a source parameter.  Here is
> >>>> the
> >>>> syntax:
>
> >>>> file { "/opt/management/dns/zones":
> >>>>                owner => "root",
> >>>>                group => "root",
> >>>>                mode => "644",
> >>>>                ensure => directory,
> >>>>                recurse => true }
>
> >>>> Then there is a service resource that subscribes to that file:
>
> >>>> service { "named":
> >>>>                enable => true,
> >>>>                ensure => running,
> >>>>                require => File["/etc/named.conf"],
> >>>>                require => File["/opt/dns/management/zones"],
> >>>>                require => Package["bind"],
> >>>>                subscribe => File["/etc/named.conf"],
> >>>>                subscribe => File["/opt/management/dns/zones"] }
>
> >>>> But the service never restarts when files in that directory
> >>>> change. I
> >>>> would think it's because I'm not sourcing those files, but I'm not
> >>>> sure.
>
> >>>> On Nov 6, 12:37 pm, "Evan Hisey" <[EMAIL PROTECTED]> wrote:
> >>>>> On Wed, Nov 5, 2008 at 6:19 PM, joe <[EMAIL PROTECTED]> wrote:
>
> >>>>>> I'm having a similar issue that that wiki entry does not directly
> >>>>>> address.
>
> >>>>>> I'm trying to do a subscribe on a file definition that is a
> >>>>>> directory.
>
> >>>>>> I have ensure => directory and recurse => true.
>
> >>>>>> I do not use puppet to source the files (they are on nfs shared to
> >>>>>> all
> >>>>>> servers that use them).
>
> >>>>>> Puppet will not restart a service subscribed to this file
> >>>>>> definition.
> >>>>>> It does not seem to look at whether the files in the directory
> >>>>>> have
> >>>>>> changed.
>
> >>>>>> How do others make such a scenario work?
>
> >>>>>> Thanks
>
> >>>>> Is puppet actually managing the directory? Unless puppet manages
> >>>>> the
> >>>>> directory it can't know to handle a restart.
>
> >>>>> Evan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: wildcards in file type?

2008-11-07 Thread joe

I don't think it's a bug that puppet sees two reasons to bounce the
service, I think it's a bug that it's only doing it when I change the
checksum to mtime.  The default is md5 (I think) and it would appear
that when you define a file resource that is a directory with recurse
=> true, puppet should generate md5s on all the files in that dir on
the first run, so it can keep track of them later, regardless of
whether puppet is copying the files into that directory or not.  It
seems to only work if puppet is sourcing the files in the directory.
It should work either way.

On Nov 7, 3:59 pm, "Paul Lathrop" <[EMAIL PROTECTED]> wrote:
> No, not a bug at all. Why do you think it might be?
>
> There is no reason to be concerned by the multiple notifications,
> either; Puppet is smart enough to only refresh the service once.
>
> --Paul
>
> On Fri, Nov 7, 2008 at 12:52 PM, joe <[EMAIL PROTECTED]> wrote:
>
> > This is interesting.  What you describe does work, but it appears
> > there's a bug somewhere.  I'm getting 2 reasons to bounce the service
> > out of the single file definition when checksum is mtime.  Here is the
> > output:
>
> > # puppetd --test
> > info: Caching catalog at /var/lib/puppet/localconfig.yaml
> > notice: Starting catalog run
> > notice: //Node[removed]/dns/File[/opt/management/dns/zones]/checksum:
> > checksum changed '{mtime}Fri Nov 07 15:46:17 -0500 2008' to
> > '{mtime}Fri Nov 07 15:47:02 -0500 2008'
> > notice: //Node[removed]/dns/File[/opt/management/dns/zones/removed-
> > ext.zone]/checksum: checksum changed '{mtime}Fri Nov 07 15:46:17 -0500
> > 2008' to '{mtime}Fri Nov 07 15:47:02 -0500 2008'
> > info: //Node[removed]/dns/File[/opt/management/dns/zones]: Scheduling
> > refresh of Service[named]
> > info: //Node[removed]/dns/File[/opt/management/dns/zones]: Scheduling
> > refresh of Service[named]
> > notice: //Node[removed]/dns/Service[named]: Triggering 'refresh' from
> > 2 dependencies
> > notice: Finished catalog run in 6.72 seconds
>
> > It appears from this output that puppet should be checksumming files
> > on recurse => true regardless of the checksumming scheme.  Is this a
> > bug?
>
> > On Nov 7, 3:11 pm, "Paul Lathrop" <[EMAIL PROTECTED]> wrote:
> >> Wrong. Set the checksum property to "mtime" on the directory resource.
> >> When a file in the directory changes, it will change the mtime of the
> >> directory which will trigger an event on any resources which subscribe
> >> to the directory.
>
> >> I have used this method a number of times to great success.
>
> >> --Paul
>
> >> On Thu, Nov 6, 2008 at 6:03 PM, Aj <[EMAIL PROTECTED]> wrote:
>
> >> > No, there is no way.
>
> >> > On 7/11/2008, at 1:01 PM, joe <[EMAIL PROTECTED]> wrote:
>
> >> >> I just added the require after subscribe alone didn't work.
>
> >> >> I thought that if I specified the directory with recurse => true, it
> >> >> would monitor all the files in the directory as well.
>
> >> >> Is there a way to have puppet monitor files it isn't sourcing?
>
> >> >> On Nov 6, 3:41 pm, Aj <[EMAIL PROTECTED]> wrote:
> >> >>> This notification will only fire if the managed parameters for the
> >> >>> directory are out of sync, e.g. Owner/group/modes/file type (link,
> >> >>> file).
>
> >> >>> Subscribe also implies require, FYI =)
>
> >> >>> On 7/11/2008, at 8:38 AM, joe <[EMAIL PROTECTED]> wrote:
>
> >> >>>> It's a defined file resource without a source parameter.  Here is
> >> >>>> the
> >> >>>> syntax:
>
> >> >>>> file { "/opt/management/dns/zones":
> >> >>>>                owner => "root",
> >> >>>>                group => "root",
> >> >>>>                mode => "644",
> >> >>>>                ensure => directory,
> >> >>>>                recurse => true }
>
> >> >>>> Then there is a service resource that subscribes to that file:
>
> >> >>>> service { "named":
> >> >>>>                enable => true,
> >> >>>>                ensure => running,
> >> >>>>                require => File["/etc/named.conf"],
&

[Puppet Users] Re: wildcards in file type?

2008-11-07 Thread joe

Though with recurse => true, puppet does look at the mtime of the
individual files, per my output sample from previous email.  My last
question was really why won't it do default checksum (md5) on the
files in the directory when I have recurse => true.  It only looks at
the files in the directory when I change the checksum type (in my case
to mtime, not sure what other options would work).

On Nov 7, 4:48 pm, "Paul Lathrop" <[EMAIL PROTECTED]> wrote:
> Sorry, I wasn't clear on the mechanism of why this works. Thanks for
> the correction.
>
> On Fri, Nov 7, 2008 at 1:24 PM, Steven VanDevender <[EMAIL PROTECTED]> wrote:
>
> > Paul Lathrop writes:
> >  > When a file in the directory changes, it will change the mtime of the
> >  > directory which will trigger an event on any resources which subscribe
> >  > to the directory.
>
> >  > I have used this method a number of times to great success.
>
> > The mtime on the directory won't change unless some kind of manipulation
> > of the directory itself occurs in the process of changing a file within
> > the directory.  This happens with a lot of editors that create temporary
> > or backup files in the same directory as the file being edited, but
> > isn't absolutely assured.  For example:
>
> > drwxr-xr-x  3 root root  4096 Oct 27 17:39 .
> > drwxr-xr-x  5 root root  4096 Aug 17  2007 ..
> > -rw-r--r--  1 root root 75576 Nov  7 11:54 access
>
> > In particular this is actually what a directory in our Puppet subversion
> > repository looks like; as no new files have been added or removed in the
> > repository since October 27, subversion hasn't had to manipulate the
> > directory itself, so the directory mtime hasn't changed even though many
> > files have been updated frequently since.
>
> > If Puppet's "mtime" tracking looks only at the mtime of the directory
> > and not at the mtime of anything underneath it, you wouldn't be able to
> > depend on that to track changes to files within the directory, unless
> > you also happen to do something to the directory every time you change a
> > file underneath it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: wildcards in file type?

2008-11-12 Thread joe

That makes sense, though I would think if you have recurse => true and
a subscribe/notify, then checksumming should be enabled by default in
that scenario also.  It may not be feasible depending on the internal
workings of puppet, but that would seem to be the expected behavior.

On Nov 12, 7:20 pm, Luke Kanies <[EMAIL PROTECTED]> wrote:
> On Nov 7, 2008, at 1:07 PM, joe wrote:
>
> > I don't think it's a bug that puppet sees two reasons to bounce the
> > service, I think it's a bug that it's only doing it when I change the
> > checksum to mtime.  The default is md5 (I think) and it would appear
> > that when you define a file resource that is a directory with recurse
> > => true, puppet should generate md5s on all the files in that dir on
> > the first run, so it can keep track of them later, regardless of
> > whether puppet is copying the files into that directory or not.  It
> > seems to only work if puppet is sourcing the files in the directory.
> > It should work either way.
>
> There is no default for checksum.  If you use file sources, then the  
> source parameter makes sure checksums are checked, but otherwise, you  
> need to add 'checksum => md5' or 'check => checksum' to your resources.
>
> If you add 'checksum => md5' you'll get the behaviour you want.
>
> --
> It has recently been discovered that research causes cancer in
> labratory rats.
> -
> Luke Kanies |http://reductivelabs.com|http://madstop.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: wildcards in file type?

2008-11-13 Thread joe

I can see myself being in the minority on this.  I think it comes from
my intense aversion toward data replication :)

On Nov 13, 3:05 pm, Luke Kanies <[EMAIL PROTECTED]> wrote:
> On Nov 13, 2008, at 11:53 AM, RijilV wrote:
>
>
>
> > 2008/11/13 Luke Kanies <[EMAIL PROTECTED]>
>
> > On Nov 12, 2008, at 4:51 PM, joe wrote:
>
> > > That makes sense, though I would think if you have recurse => true  
> > and
> > > a subscribe/notify, then checksumming should be enabled by default  
> > in
> > > that scenario also.  It may not be feasible depending on the  
> > internal
> > > workings of puppet, but that would seem to be the expected behavior.
>
> > I guess I'm of two minds, but this doesn't really come up very often
> > -- most people don't seem to want to do recursive checking without
> > having a remote source.
>
> > Anyone else have an opinion?
>
> > I'd rather not checksum recursively without explicitly stating to do  
> > so.
>
> *whew* :)
>
> --
> Always read stuff that will make you look good if you die in the
> middle of it. -- P. J. O'Rourke
> -
> Luke Kanies |http://reductivelabs.com|http://madstop.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: create a file only if directory exists

2008-11-20 Thread joe

Your require is actually creating the site1 directory if it doesn't
exist (unless your file def. for that directory has ensure => absent).
I think you want to go the other way and ensure that the site1.conf is
created by the definition for the site1 directory.  In other words,
put a require for the site1.conf in the file definition for the site1
directory.

On Nov 20, 3:05 pm, Hang Chan <[EMAIL PROTECTED]> wrote:
> I'm trying to create a virtual host file only if the document root
> directory exists.  It doesn't look like puppet is seeing the require
> metaparameter.  Currently, the file is being created whether or not
> the document root directory exists.  What is the best way to currently
> do this?
>
> I'm trying to create a file called site1.conf in /apps/apache/conf.d
> only if /var/www/html/site1 directory exists.
>
> file { "/apps/apache/conf.d/site1.conf":
>         ensure => present,
>         content => template("apache/virtual_host.erb"),
>         notify => Service["jboss_apache"],
>         require => File["/var/www/html/site1"]
>       }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Best practice for modifying options in an inherited class?

2008-12-12 Thread joe

You should use a subclass with an override, like so:

class postfix-special inherits postfix {
   File["/etc/postfix/main.cf"]{
 content => template("apps/postfix/main.cf.special.erb") }

node special {
   include baseclass
   include postfix-special }

That should get you the desired behavior without copying the entire
class and having to keep them in sync.

On Dec 12, 3:59 pm, "Ben Beuchler"  wrote:
> I've just built a simple class to manage Postfix.  That class is
> included in "baseclass" which is included in my default node.  My
> intent is that "baseclass" and "basenode" install and configure all of
> the packages that are common across all of my nodes.  However, some of
> the more specialized nodes will require a different Postfix config.
>
> Since those nodes inherit the standard Postfix config included in
> "basenode", what's the best way to configure them to retrieve a
> different main.cf file for their Postfix install?
>
> Do I need to create different Postfix classes for each of the types of
> nodes that only differ by their "content =>" line?  There must be a
> cleaner way.
>
> My current config is included below.
>
> Thanks!
>
> -Ben
>
> # classes/postfix.pp
> class postfix {
>     package { "postfix": ensure => present }
>     service { "postfix": ensure => running }
>     file { "/etc/postfix/main.cf":
>         content => template("apps/postfix/main.cf.base.erb"),
>         notify => Service["postfix"],
>         require => Package["postfix"],
>     }
>
> }
>
> # classes/baseclass.pp
> class baseclass {
>     include postfix
>     include vim
>     include basefiles
>     include sudo
>     include ntp::server
>
>     package {
>         "syslog-ng": ensure => present;
>         "tcsh":      ensure => present;
>     }
>
> }
>
> # nodes.pp
> node default {
>     include baseclass
>
> }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Pushing out puppet.conf?

2009-02-18 Thread joe

You must do one of two things to make this work.

You can either add a subscribe in the service definition for the
puppet.conf or you can put a notifiy in the puppet.conf file
definition for the puppet service.

example 1:

service {"puppet":
ensure => running,
enable => true,
subscribe => File["etc/puppet/puppet.conf"],
}

example 2:

file {"/etc/puppet/puppet.conf":
owner => root,
group => root,
mode => 644,
source => "puppet:/files/lserver/puppet.conf",
notify => Service["puppet"],
}

Just because you define these things in the same class does not mean
you have defined any relationships between the definitions in the
class.  There's really no way for puppet to "figure out" that the file
definition is related to the service definition unless you tell it
they are related through one of the above methods.


On Feb 18, 6:03 pm, "David Dyer-Bennet"  wrote:
> I have a very simple-minded puppet.pp class, displayed in full at the bottom.
>
> When I update the file source of the puppet.conf file, the file gets
> distributed to the slave systems, but the service does not then get
> restarted.  The doc says the service gets restarted whenever it receives "
> an event"; isn't updating a file in the class an event?
>
> I manually restarted the puppet service on one of the clients, and then
> the new config file immediately took effect.
>
> So what am I overlooking?
>
> (By the way, the lock file issue I asked about previously seems to have
> cleared itself up with a couple of restarts; that is, it went away while I
> was thrashing on other things.)
>
> Here's the puppet class, as promised:
>
> # $Id: puppet.pp 549 2008-11-26 16:30:47Z David.Dyer-Bennet $
>
> # This is amusingly, or perhaps recursively, warped.  We want to
> # deploy a stock puppet config, so that the server name gets
> # distributed during bootstrapping.
>
> class puppet {
>     file { "/etc/puppet/puppet.conf":
>         owner => root,
>         group => root,
>         mode => 644,
>         source => "puppet:/files/lserver/puppet.conf"
>     }
>     file { "/etc/puppet/namespaceauth.conf":
>         owner => root,
>         group => root,
>         mode => 644,
>         source => "puppet:/files/lserver/namespaceauth.conf"
>     }
>     package { "puppet":
>         ensure => latest,
>     }
>     service { "puppet":
>         ensure => running,
>         enable => true,
>     }
>
> }
>
> --
> David Dyer-Bennet, d...@dd-b.net;http://dd-b.net/
> Snapshots:http://dd-b.net/dd-b/SnapshotAlbum/data/
> Photos:http://dd-b.net/photography/gallery/
> Dragaera:http://dragaera.info
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Experiences with RHN Satellite?

2009-03-09 Thread joe

Did a POC of it at my current company.  I've also had the RedHat
Enterprise Deployment and Virtualization class.

This product was originally envisioned began development before RedHat
even had an IPO.  The reason I mention this is that the mindset around
systems management at that time is what you're getting with this
product. Which means it was designed for management types to be able
to say that everything is up to date and secure all the time.  I don't
think they ever really fleshed it out as a systems management platform
in the first place.

I have also seen RedHat Sales Techs that couldn't get the product
installed and required my assistance to get it running.

The process of adding your own content to Satellite is one of the most
convoluted and time-intensive that I've seen. If you wish to add your
own packages, you must GPG all the packages and then find some way to
distribute your keys, which Satellite cannot do for you (this is
because the only way that would work through Satellite is if you
packaged your gpg key and had a post script to run the rpm --import,
but you can't do that because all your packages must be signed and
can't be installed if your gpg key hasn't already been imported.

The program claims support for Solaris, but it is woefully inadequate
in a multitude of ways (esp. now with zones and containers)

It was recently open-sourced, but they charge for the working version
because it is completely dependent on Oracle to run and the license is
for the embedded Oracle database that comes with it.  I haven't seen
any progress making Satellite work on another RDBMS yet.

The monitoring portion of the product is a joke and completely an
afterthought.  It severely lacks any configurability or extensibility.

The licensing scheme is insane.  You need an "entitlement" to track
the box and manage packages. You need another to do automated
installs, and another to do monitoring.  All of these are PER MACHINE.

When I asked about scalability, I was told there were Satellite Proxy
servers, but they were really only to span physical locations, not
really to distribute load.  When I asked if the product could be built
out in such a way as to manage 10K+ machines, they told me we should
pay them to maintain such a system for them.

Even their instructors have been known to make veiled references to
the poor conception and implementation of the product.

I was told there would be some major changes in a newer version, but I
believe we used 5.? in the class I took a little over a year ago.  I'm
guessing the major changes they were talking about were making it open
source.

On Mar 9, 11:50 am, Stephen John Smoogen  wrote:
> On Sun, Mar 8, 2009 at 11:37 PM, Russ Allbery  wrote:
>
> > PeterBurkholder  writes:
>
> >> My boss has RedHat coming in on Tuesday to give a spiel on RHN
> >> Satellite.  I'm dubious, as it seems mostly like a web UI wrapped around
> >> a Yum repository system and a half-baked configuration management
> >> system.  I'm of the opinion that our time and money would be better
> >> spent getting off of RHN for package distribution, setting up our own
> >> Yum repositories, getting a good start on Puppet, and bringing in Luke
> >> Kanies for a week to bring the Puppet installation to up to snuff.
> >> FWIW, we'll be looking about 50 systems that need to be managed, and we
> >> may not have to pay for server itself ($13.5K) just for the system
> >> subscriptions ($200 each).
>
> > After spending a completely unproductive six months trying to get the
> > Satellite to work for us, we did pretty much exactly what you said above
> > and had considerably more success.  In our experience, the Satellite is
> > buggy, limited, and opaque, and basically unsupported by Red Hat in any
> > meaningful way.  (I think the icing on that cake was when the Red Hat
> > on-site engineer proved incapable of installing his own product.)
>
> All I can say is that I have had a 180 degree different viewpoint on
> it.. but this isn't the list to go over that. The configuration
> management system is not is strong point though. I would go with
> puppet in it instead.
>
> > I do, however, know other people who have had considerably better luck
> > with it and swear by it.
>
> > --
> > Russ Allbery (r...@stanford.edu)             
>
> --
> Stephen J Smoogen. -- BSD/GNU/Linux
> How far that little candle throws his beams! So shines a good deed
> in a naughty world. = Shakespeare. "The Merchant of Venice"
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: How to put files in a user's home dir without knowing it?

2009-05-12 Thread joe

If you have a fact called home_root you would use it like this:

file { "$home_root/$user/.zshenv":
...}

Does that work for you?

On May 12, 2:15 pm, Robin Lee Powell 
wrote:
> What I want to do is:
>
>     file { "~$user/.zshenv":
>     ...}
>
> but that doesn't work.  I made custom facts for home dirs, so that
> "home_root" should work, but his:
>
>     file { "${home_$user}/.zshenv":
>     ...}
>
> doesn't work either.
>
> Help?
>
> -Robin
>
> --
> They say:  "The first AIs will be built by the military as weapons."
> And I'm  thinking:  "Does it even occur to you to try for something
> other  than  the default  outcome?"  
> Seehttp://shrunklink.com/cdizhttp://www.digitalkingdom.org/~rlpowell/***http://www.lojban.org/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: How to put files in a user's home dir without knowing it?

2009-05-12 Thread joe

What exactly is your define attempting to do?  Define the users for
which a certain file gets placed in their home dir or define the file
that gets put into all users' home dirs?

On May 12, 3:06 pm, Robin Lee Powell 
wrote:
> No, because I'm making a define so I can put a bunch of files in a
> bunch of different user's home directories; that why I use $user
> below.
>
> -Robin
>
>
>
> On Tue, May 12, 2009 at 12:04:08PM -0700, joe wrote:
>
> > If you have a fact called home_root you would use it like this:
>
> > file { "$home_root/$user/.zshenv":
> > ...}
>
> > Does that work for you?
>
> > On May 12, 2:15 pm, Robin Lee Powell 
> > wrote:
> > > What I want to do is:
>
> > >     file { "~$user/.zshenv":
> > >     ...}
>
> > > but that doesn't work.  I made custom facts for home dirs, so that
> > > "home_root" should work, but his:
>
> > >     file { "${home_$user}/.zshenv":
> > >     ...}
>
> > > doesn't work either.
>
> > > Help?
>
> > > -Robin
>
> > > --
> > > They say:  "The first AIs will be built by the military as weapons."
> > > And I'm  thinking:  "Does it even occur to you to try for something
> > > other  than  the default  outcome?"  
> > > Seehttp://shrunklink.com/cdizhttp://www.digitalkingdom.org/~rlpowell/***...
>
> --
> They say:  "The first AIs will be built by the military as weapons."
> And I'm  thinking:  "Does it even occur to you to try for something
> other  than  the default  outcome?"  
> Seehttp://shrunklink.com/cdizhttp://www.digitalkingdom.org/~rlpowell/***http://www.lojban.org/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: How to put files in a user's home dir without knowing it?

2009-05-12 Thread joe

If home_root is being set to /home or /export/home or whatever, then
what I told you at first should work...

On May 12, 3:20 pm, Robin Lee Powell 
wrote:
> Define a set of files such that, given a user, all those files get
> placed under the user's homedir.
>
> I suppose I could pass $home_root to the define, and have it operate
> on the directory rather than the user name.
>
> -Robin
>
>
>
> On Tue, May 12, 2009 at 12:15:36PM -0700, joe wrote:
>
> > What exactly is your define attempting to do?  Define the users for
> > which a certain file gets placed in their home dir or define the file
> > that gets put into all users' home dirs?
>
> > On May 12, 3:06 pm, Robin Lee Powell 
> > wrote:
> > > No, because I'm making a define so I can put a bunch of files in a
> > > bunch of different user's home directories; that why I use $user
> > > below.
>
> > > -Robin
>
> > > On Tue, May 12, 2009 at 12:04:08PM -0700, joe wrote:
>
> > > > If you have a fact called home_root you would use it like this:
>
> > > > file { "$home_root/$user/.zshenv":
> > > > ...}
>
> > > > Does that work for you?
>
> > > > On May 12, 2:15 pm, Robin Lee Powell 
> > > > wrote:
> > > > > What I want to do is:
>
> > > > >     file { "~$user/.zshenv":
> > > > >     ...}
>
> > > > > but that doesn't work.  I made custom facts for home dirs, so that
> > > > > "home_root" should work, but his:
>
> > > > >     file { "${home_$user}/.zshenv":
> > > > >     ...}
>
> > > > > doesn't work either.
>
> > > > > Help?
>
> > > > > -Robin
>
> > > > > --
> > > > > They say:  "The first AIs will be built by the military as weapons."
> > > > > And I'm  thinking:  "Does it even occur to you to try for something
> > > > > other  than  the default  outcome?"  
> > > > > Seehttp://shrunklink.com/cdizhttp://www.digitalkingdom.org/~rlpowell/***...
>
> > > --
> > > They say:  "The first AIs will be built by the military as weapons."
> > > And I'm  thinking:  "Does it even occur to you to try for something
> > > other  than  the default  outcome?"  
> > > Seehttp://shrunklink.com/cdizhttp://www.digitalkingdom.org/~rlpowell/***...
>
> --
> They say:  "The first AIs will be built by the military as weapons."
> And I'm  thinking:  "Does it even occur to you to try for something
> other  than  the default  outcome?"  
> Seehttp://shrunklink.com/cdizhttp://www.digitalkingdom.org/~rlpowell/***http://www.lojban.org/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



Re: [Puppet Users] How to only apply my manifests to certain classes?

2012-12-22 Thread joe
This is an excellent post on how to organize those types of dependencies.

http://www.craigdunn.org/2012/05/239/

On Friday, December 21, 2012 4:10:45 AM UTC-7, Steve Button wrote:
>
> On Thursday, 20 December 2012 16:51:59 UTC, rvs wrote:
>
>> On Thu, Dec 20, 2012 at 8:11 AM, Steve Button  
>> wrote: 
>> > Hi, 
>> > 
>> > I've written a new resolv class, but I only want it to get pushed out 
>> (for 
>>
>>
>> Please let us know a bit more about your setup. 
>>
>> Thanks, 
>> Roman. 
>>
>
> I've used puppet before at several companies, but it's always been already 
> set up before I arrived and I've only modified the existing manifests. 
>
> Currently I'm at a new site and we're not using Puppet at all, just at the 
> proof of concept stage. 
>
> I'm aware Puppet is very powerful, which also means it could be very 
> dangerous. I'd like to avoid bringing down the whole IT infrastructure (of 
> course) by rolling out a change to resolv.conf, for example, which could 
> potentially cripple a node. When I make a change I'd like to first test it 
> on one single node, then perhaps 10 in Dev, then after a day or so the rest 
> of Dev. Likewise for UAT and Prod environments. So, that's one 
> requirement... to be able to roll things out gradually to give it time to 
> spot mistakes in the code. 
>
> I guess the apache / resolv example is a little contrived, and doesn't 
> represent a real use case. More likely we might want certain packages / 
> kernel setting on our Oracle servers, but different ones on our SAP 
> servers. Looking at the example pointed to...
>
> node 'www1.example.com', 'www2.example.com', 'www3.example.com' { include 
> common include apache, squid }
>
> I guess I could add "include uat" and then put things that are specific to 
> UAT servers only in there. 
>
> Thanks for all the pointers, I think I've got a lot of reading to do and 
> feeling a little overwhelmed!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/QwjnSscd8KYJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: problem with restart a service when a file changes

2012-12-26 Thread joe
What it's telling you is that the command it's running (zmamavisdctl) is 
spitting out a return code of 1, which typically means that there was an 
error running the script.

Either the command is actually failing, or the command is poorly written 
and does not provide the correct return code.

This is not actually a problem with puppet at all.

On Wednesday, December 26, 2012 3:13:44 PM UTC-7, Kazor wrote:
>
> Hello,
> I have problem with my class when the archive is changed and the service 
> is not restarted when i apply change and run the puppet agent, I have the 
> next error:
>
> [..]
> * err: /Stage[main]/Spam_rule/Exec[zmamavisdctl]: Failed to call refresh: 
> /opt/zimbra/bin/zmamavisdctl returned 1 instead of one of [0] at 
> /etc/puppet/modules/spam_rule/manifests/init.pp:25* 
> [..]
>
> Note: The change that i written in the archive (*
> /etc/puppet//modules/spam_rule/99_rules.cf*) is applied to puppet agent 
> the problem is only refresh (restart) to resource.
>
>
> My class is "spam_rule" (/etc/puppet/modules/spam_rule/manifests/init.pp)
> *
> *
> [..]*
> *
> *class spam_rule {*
> *
> *
> *if $TypeSrv == "zimbra" {*
> *
> *
> *# global perms*
> *File {*
> *  owner => zimbra,*
> *  group => zimbra,*
> *  mode  => 644,*
> *}*
> *
> *
> *# create rule archive*
> *file { "/opt/zimbra/conf/spamassassin/99_rule.cf":*
> *ensure => file,*
> *source => "puppet:///modules/spam_rule/99_rules.cf",*
> *   # notify  => Exec["zmamavisdctl"],*
> *}*
> *
> *
> *
> *
> *# define the service to restart*
> *exec { "zmamavisdctl":*
> *refreshonly => true,*
> *command => "/opt/zimbra/bin/zmamavisdctl",*
> *subscribe => File["/opt/zimbra/conf/spamassassin/99_rules.cf"],*
> *}*
> *
> *
> *}*
> *
> *
> *else{*
> *
> *
> *# globals perms*
> *File {*
> *  owner => mailcleaner,*
> *  group => mailcleaner,*
> *  mode  => 644,*
> *}*
> *
> *
> *# create rules archive*
> *file { "/usr/mailcleaner/share/spamassassin/99_rules.cf":*
> *ensure => file,*
> *source => "puppet:///modules/spam_rule/99_rules.cf",*
> * }*
> *
> *
> *# service restart*
> *exec { "mailscanner":*
> *refreshonly => true,*
> *command => "/usr/mailcleaner/etc/init.d/mailscanner",*
> *subscribe => File["/usr/mailcleaner/share/spamassassin/99_rules.cf"],
> *
> *}*
> *
> *
> *}*
> * *
> *}*
> *
> *
> [..]*
> *
>
>
> *My site.pp (/etc/puppet/manifests/)*
> *
> *
> [..]*
> *
>
> *
>
> #all mailcleaner  
> server
> *
> node /^mailcleaner.*$/ {
> $TypeSrv="mailcleaner"
> include spam_rule
> }
>
> node 'mail.example.com' {
> $TypeSrv="zimbra"
> include spam_rule
>
> }
>
> [..]
>
> ¿Some suggestion?
>
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/xgmgCkLvGnkJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: looping over directory array

2013-01-08 Thread joe
Create a defined type and call it with the array of app names:

define app_dirs {

  file {"/some/where/${title}/foo":
mode => '0644'
  }

  file {"/some/where/${title}/bar":
mode => '0644',
  }
}

app_dirs { apps: }

On Tuesday, January 8, 2013 12:18:49 PM UTC-7, Stefan Wiederoder wrote:
>
> I´ve an application which has always the same directory structure:
> /some/where/app1/foo
> /some/where/app1/bar
> /some/where/app2/foo
> /some/where/app2/bar
> /some/where/app3/foo
> /some/where/app3/bar
> and so on.
>
> I´de like to set owner/group permissions while using a loop with an array:
> $path = "/some/where"
> # array
> apps = [ "app1", "app2", "app3", ]
>
> but - how can I achieve this?
>
> thanks
> ,
> Stefan
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/Er6NqmvRq8cJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: looping over directory array

2013-01-08 Thread joe
Sorry, that should be app_dirs { $apps: }

On Tuesday, January 8, 2013 12:59:49 PM UTC-7, joe wrote:
>
> Create a defined type and call it with the array of app names:
>
> define app_dirs {
>
>   file {"/some/where/${title}/foo":
> mode => '0644'
>   }
>
>   file {"/some/where/${title}/bar":
> mode => '0644',
>   }
> }
>
> app_dirs { apps: }
>
> On Tuesday, January 8, 2013 12:18:49 PM UTC-7, Stefan Wiederoder wrote:
>>
>> I´ve an application which has always the same directory structure:
>> /some/where/app1/foo
>> /some/where/app1/bar
>> /some/where/app2/foo
>> /some/where/app2/bar
>> /some/where/app3/foo
>> /some/where/app3/bar
>> and so on.
>>
>> I´de like to set owner/group permissions while using a loop with an array:
>> $path = "/some/where"
>> # array
>> apps = [ "app1", "app2", "app3", ]
>>
>> but - how can I achieve this?
>>
>> thanks
>> ,
>> Stefan
>>
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/hQPNzWuhGDMJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



Re: [Puppet Users] Resource ordering problem...

2013-01-31 Thread joe
Nothing about your notify resources is actually telling you what's going on 
with the variables. Just because the details notify happens last, doesn't 
mean that the variable was evaluated at that time. Variable assignment is 
parse-order dependent. I'd look to make sure your custom function actually 
works.

On Thursday, January 31, 2013 1:48:25 PM UTC-7, Gavin Williams wrote:
>
> Matt
>
> Yeh, the function is defined within this module...
>
> I'll give moving the loadyaml into parse_databases a go when back in the 
> office in the morning...
>
> Any other ideas welcome though...
>
> Cheers 
> Gavin
> On Jan 31, 2013 8:43 PM, "Matthew Burgess" 
> > 
> wrote:
>
>> On Thu, Jan 31, 2013 at 5:52 PM, Gavin Williams 
>> > 
>> wrote:
>> > Afternoon all
>> >
>> > I'm sure this is probably a nice n easy one, but I can't work it out 
>> for the
>> > life of me...
>> >
>> > Anyhow, I've got the following code:
>> >   # Load db yaml data
>> >   $db_details = loadyaml('/etc/puppet/data/databases.yaml')
>> >
>> >   notify{"DB Details loaded... About to parse.":}
>> >   ->
>> >   notify{"DB Details = ${db_details}.":}
>> >
>> >   #$hostname = lookupvar('{hostname}')
>> >   # Parse data and filter to only primary databses for this server
>> >   $databases = parse_databases($db_details, 'database_primay_server',
>> > $::hostname)
>> >
>> >   notify{"Parsed db details, creating resources.":}
>> >   ->
>> >   notify{"Databases = ${databases}":}
>> >
>> >   # Create required resources...
>> >   if $::oracle_netapp {
>> > notify{"\$::oracle_netapp is true.":}
>> > create_resources( act::env::oracle::instance::netapp, $databases)
>> >   }
>> >
>> > Parse_databases() is a custom function within one of my modules..
>>
>> And I assume that the module that defines/declares parse_databases()
>> is 'include'd just above this snippet?  Not that I'm sure it will
>> change things.  If not...
>>
>> As $db_details is only used by the parse_databases() function (in this
>> snippet), is it possible to move the call to loadyaml() within the
>> function itself?  I've assumed you need $db_details further on outside
>> of the code you showed here, but thought I'd suggest the bleeding
>> obvious, just in case :-)
>>
>> Thanks,
>>
>> 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...@googlegroups.com .
>> To post to this group, send email to puppet...@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: Installing Operating systems

2013-02-04 Thread joe
Puppet doesn't do OS provisioning itself. You'd need a separate system to 
do that part, then hand off to puppet after a minimal install has been 
completed. 

You can use a tool like Foreman (http://theforeman.org/). It will handle 
the provisioning of the systems and also integrates with puppet to assign 
classes and handle ssl certs.


On Monday, February 4, 2013 4:28:53 AM UTC-7, Manish Singh wrote:
>
> Hello All,
>
> I am new to puppet and was trying to figure out whether puppet can handle 
> the requirement I had. 
>
> The requirement is to reinstall an OS (Windows, distributions of Linux) on 
> slave machines before a job is executed. This is needed as we need a clean 
> OS before executing the jobs on the nodes..
>
> Is there a way using puppet that I plugin a machine to the puppet network, 
> I can install a OS of my choice on the node and then that node gets added 
> as a puppet node for further job execution?
>
> -Manish
>
>
>

-- 
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: Installing Operating systems

2013-02-04 Thread joe
There is also razor 
(https://puppetlabs.com/solutions/next-generation-provisioning/). It is 
only for provisioning (not assigning classes) and is the future of 
provisioning and puppet.

On Monday, February 4, 2013 11:29:33 AM UTC-7, joe wrote:
>
> Puppet doesn't do OS provisioning itself. You'd need a separate system to 
> do that part, then hand off to puppet after a minimal install has been 
> completed. 
>
> You can use a tool like Foreman (http://theforeman.org/). It will handle 
> the provisioning of the systems and also integrates with puppet to assign 
> classes and handle ssl certs.
>
>
> On Monday, February 4, 2013 4:28:53 AM UTC-7, Manish Singh wrote:
>>
>> Hello All,
>>
>> I am new to puppet and was trying to figure out whether puppet can handle 
>> the requirement I had. 
>>
>> The requirement is to reinstall an OS (Windows, distributions of Linux) 
>> on slave machines before a job is executed. This is needed as we need a 
>> clean OS before executing the jobs on the nodes..
>>
>> Is there a way using puppet that I plugin a machine to the puppet 
>> network, I can install a OS of my choice on the node and then that node 
>> gets added as a puppet node for further job execution?
>>
>> -Manish
>>
>>
>>

-- 
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: Best way for conditional dependency?

2013-02-05 Thread joe
If freeipa-client will be on all systems, just order it the other way. 

In the user module, make your class before freeipa-client. That way, the 
ordering is only in place when you include the user class.

On Tuesday, February 5, 2013 11:21:30 AM UTC-7, Bret Wortman wrote:
>
> I have a situation where I have a module which manages some user accounts 
> which, if required by a system, need to be physically present on that box. 
> I have another module which sets up freeipa-client for all systems.
>
> The catch is that when the first module is present, it needs to be 
> installed prior to the ipa-client module. But if I give ipa-client a 
> dependency on it, it will force it to always be installed, which isn't what 
> I want. 
>
> What's the most puppet-ish way to handle this?
>

-- 
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: puppet exported resources are not being realized

2013-02-08 Thread joe
I think your collector syntax is off. Try this:

File <|  tag == 'tmp-file' |> (note the fewer | characters)

That should probably be a syntax error...

On Friday, February 8, 2013 10:25:37 AM UTC-7, ashrith wrote:
>
> I am trying to export store config's using puppetdb as follows:
>
> node test {
>   @@file { "/tmp/test":
>  content => "test file",
>  tag => "tmp-file",
>   }
> }
>
> node test2 {
>  File <|| tag == 'tmp-file' ||>
> }
>
> And, then when I run puppet on node test the resource is being exported 
> and can be verified by looking into puppetdb (table: catalog_resources). 
> But, when I run puppet on node test2 strangely the resource is not being 
> realized and created.
>
> Mean while my nagios module developed based on stored-configs is working 
> fine, this module was able to export as well as realize stored-configs from 
> puppetdb.
>
> Puppet version being used is 3.1.0 and puppetdb version is 1.1.1.
>
> I kind of stuck and cannot find a way to resolve this issue, any help is 
> appreciated.
>

-- 
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] Error: Could not find class for on node

2013-02-11 Thread joe
The simple answer is to put

include manifests/*.pp

in your site.pp, but real answer to follow the module convention: 

http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html

-- 
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: Checking GIT updates

2013-02-14 Thread joe
Puppet isn't particularly good at code deployment. Ideally, you'd package 
your code, set a package resource to ensure => latest, then update your 
package repo with the new code. Then, all the resources that subscribe to 
that package (services, etc.) would be refreshed when the package gets 
updated in your repo.

On Thursday, February 14, 2013 1:49:42 PM UTC-7, John Coggeshall wrote:
>
> Hello all,
>
> I'm using puppet to deploy my codebase from GIT. I have everything 
> working, but i currently don't have any way to check to make sure there is 
> actually something TO deploy before it goes through the entire process of 
> deploying the code. I want to create a conditional that only re-deploys the 
> code if the revision actually changed.
>
> So far, I can have it as part of the deploy process write the contents of 
> 'git rev-parse HEAD' to a file, this way I can do something like this from 
> BASH:
>
> [ `cat git-current-hash` != `git rev-parse HEAD` ]
>
> which will return true only if there is a new revision to pull. The 
> question is, how do I conditional include many different file {} and other 
> things only if that condition is true? If this was just an exec{} I could 
> use onlyif.
>
> 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] puppet module issue

2013-02-22 Thread joe
WIth the puppet module structure, you don't import any pp files from the 
modules ever. You only use include.

If you look at the github for the module, it explains which classes do what.
https://github.com/puppetlabs/puppetlabs-mysql

The base class (mysql) only installs the client. mysql::server will install 
mysql-server and there are other classes for setting up databases and such.

Include the ones you need in your node definitions, not in site.pp

On Friday, February 22, 2013 9:59:20 AM UTC-7, Raymond Regnier wrote:
>
> So I'm just trying to run the mysql module and have all of my clients pick 
> it up
>
> for example I've created my own httpd and iptables modules and I have them 
> include in my site.pp file.. however both of those modules just have a 
> init.pp under their respective manifest directory.
>
> They run fine when each client completes its pull from the master.. the 
> clients get httpd and iptables installed.
>
> So I downloaded the already created mysql module. 
> Its under my /etc/puppet/modules/mysql directory 
>
> under that directory is a manifests directory which contains a whole lot 
> of .pp files including a init.pp file which installs just mysql.. the other 
> pp files install like mysql-server and other packages
> however when I put in my site.pp file when I have the clients pull from 
> the master they only pick up mysql as it should from the mysql module's 
> init.pp file.. however it doesn't do anything else.. It seems as if the 
> clients don't see the other pp files to execute or do anything..
>
> is it because of my site.pp file? should i have import modules at the top 
> of the file? or list each one like
> include mysql
> include mysql::server
>
> does this make sense?
>
> On Friday, February 22, 2013 11:52:36 AM UTC-5, Felix.Frank wrote:
>>
>> On 02/22/2013 05:43 PM, Raymond Regnier wrote: 
>> > Hi, 
>> > 
>> > No i'm trying to have puppet run all of the pp files under the module's 
>> > manifest directory 
>> > all it does is run init.pp 
>> > 
>> > could it be because I'm not specifying every specifc pp file in my 
>> > site.pp file on the master? 
>>
>> But that's the thing - you don't "run" a manifest file. Puppet uses the 
>> files to find declarations of types and classes. 
>>
>> What exactly are you trying and failing? 
>>
>

-- 
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: Restructure puppet modules

2013-03-11 Thread joe
Modules are not overkill and are, in fact, the only way you can do what you 
intend. 

There is currently no module structure that would allow you organize your 
manifests the way you'd like and still be able to apply classes flexibly.

The reason for this is that the module structure in puppet is mostly a file 
naming convention that  allows the master to locate particular classes. If 
you wish to flexibly include/declare classes as you wish, the only way 
puppet would be able to find them and flexibly apply them would be to 
follow the module convention.

For instance, for a class nginx, the *only* place puppet can find that and 
apply it flexibly is if it is located in $moduledir/nginx/manifests/init.pp.

Otherwise, you'd have to still rely on import and then have a *ton* of 
conditionals everywhere to figure out whether to actually apply each class. 
This is not maintainable at all.

Go with modules. You'll have many fewer issues later.

On Monday, March 11, 2013 12:23:47 PM UTC-6, Andrea Crotti wrote:
>
> So far we have a similar situation, for each different server one fabric
> and one puppet file, where the fabric file simply applies it in a brutal 
> way.
>
>
> with settings(user='root'):
> put('qa.pp', 'qa.pp')
> put('puppet apply qa.pp')
>
> And puppet files don't use anything like classes or modules, but simply:
>
> package {["nginx", "python-virtualenv", "rsync", "autossh", 
> "redis-server", "git-core", "python-dev", "ntp"]:
>   ensure => installed}
>
> service { 'nginx' :
>   ensure => "running",
>   enable => true,
>   hasrestart => true,
>   require => Package["nginx"]
> }
>
>
> Now there are many issues with the current setup, where the first is we
> are not really managing our servers, but we can only provision them..
>
> The second big problem is that there is a lot of repetition everywhere
> and the third is that I can't easily provision multiple services on a
> single machine (if they were supposed initially to run on different
> machines).
>
> Now I read some doc and in theory it looks like I should create one
> module per each service.
>
> - nginx
>  + templates
>  + manifests
>
> - couch
>  + templates
>  + manifests
>
> this is however overkill for me, what I think would make more sense
> would be
>
> - templates
>   + nginx
>   + couch
>
> - manifests
>   + base.pp
>   + couch.pp
>   .. 
>
> Is it possible to use such a structure though?
>
> I just want to be able to use classes smartly, avoid duplication and
> start working with puppetmaster instead of this silly way..
>
> Any advice?
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Organization of puppet classes

2013-03-11 Thread joe
You want roles and profiles:
http://www.craigdunn.org/2012/05/239/

On Monday, March 11, 2013 6:02:15 PM UTC-6, Mike Reed wrote:
>
> Hello All,
>
> I've been looking for a simple way to clean up my nodes.pp file and I was 
> hoping to get some suggestions from you folks.  At the moment, I keep all 
> my class definitions within nodes.pp.  It currently looks something like 
> this:
>
> ### regex based workstation nodes 
>   node /^sbx-[^\s]*$/ {
>   include gen-lucid-stages
>   class { sbx-lucid-base-security : stage => security }
>   class { sbx-lucid-workstation-base  : stage => packages }
>   class { sbx-lucid-base-upgrade  : stage => upgrade }
>   class { sbx-lucid-base-dist-upgrade : stage => dist-upgrade }
>   class { sbx-lucid-base-filesystem   : stage => filesystem }
>   class { sbx-lucid-base-graphics : stage => graphics }
>   class { sbx-lucid-weta-config   : stage => configs }
>  }
>
> ### Lucid Groupings 
> class sbx-lucid-base-security {
> include sbx-lucid-common-puppet
> include sbx-lucid-common-auth
> include sbx-lucid-common-powerbroker
> }
> class sbx-lucid-workstation-base {
> include sbx-lucid-workstation-default
> }
> class sbx-lucid-base-upgrade {
> include sbx-lucid-common-upgrade
> }
> class sbx-lucid-base-dist-upgrade {
> include sbx-lucid-common-dist-upgrade
> }
> class sbx-lucid-base-filesystem {
> include sbx-lucid-common-autofs
> include sbx-lucid-common-softlinks
> }
> class sbx-lucid-base-graphics {
> include sbx-lucid-common-kubuntu-desktop
> include sbx-lucid-common-weta-kde
> include sbx-lucid-common-nvidia-driver-29553
> }
>
> This however seems a bit cluttered and I was hoping to move these classes 
> out of nodes.pp and into somewhere a bit more tidy.  It's probably my 
> rudimentary understanding of puppet but are there any suggestions into how 
> I might achieve this?
>
> Thanks in advance for the help on this one.
>
> Cheers,
>
> Mike
>

-- 
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: Only running database_grant the first time.

2013-03-12 Thread joe
refreshonly should be built in to all types. Did you actually try it, or 
did you just not see any docs saying it was there?

On Tuesday, March 12, 2013 4:45:58 AM UTC-6, Stuart Grimshaw wrote:
>
> I'm using puppet through Vagrant to manage my dev VM, and as part of that 
> I have  a few database grants that I run after creating users, but when I 
> subsequently run vagrant up or provision these grants fail (because of some 
> changes I make to the mysql config after they have been created.)
>
> I'm using database_grant to execute the grants, but there doesn't seem to 
> be a refreshonly parameter for it?
>
> Is there any way to avoid running these grants again? 
>

-- 
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: Difference between Topic and Queue in ActiveMQ?

2013-03-13 Thread joe
You should try asking the ActiveMQ community, not the puppet community.

On Wednesday, March 13, 2013 3:33:35 AM UTC-6, snlsin...@gmail.com wrote:
>
> Hi all,
>  I m not clear with ActiveMQ topic and queue? Please tell me how 
> they work?
>
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet and mobile OS

2013-03-13 Thread joe
The bigger issue here is that neither iphone nor android really *need* what 
puppet offers. In terms of deployment, there are already methods of doing 
such things (TouchDown comes to mind) that better reflect the model of the 
mobile OS. Most of the underlying tools used by the providers in puppet are 
not even available, so you'd be doing a bunch of work to implement a tiny 
subset of puppet features on a mobile os. It's just not a road you want to 
go down (or someone would have started on it already).

On Wednesday, March 13, 2013 8:29:25 AM UTC-6, jcbollinger wrote:
>
>
>
> On Wednesday, March 13, 2013 8:14:11 AM UTC-5, bernard...@morpho.comwrote:
>>
>> Hi, 
>>
>> Thanks for your answer and I hope that I do not " hijacked" a thread. 
>>
>> My company sells a product, and a part of this product may be used on 
>> mobile and classical computers. 
>>
>> We look to use for deployment tool on classical computers, and as usual, 
>> it is more simple to use one tool only for deployment. 
>>
>> So I have to cover a requirement for deployment on  mobile, this is the 
>> cause of my question, after that the mobile number is between one or two 
>> until one or two thousands. 
>>
>> For IPhone, I understand your answer, but for Android and W8 ? One is 
>> based on Linux, the other one on windows; your answer means that Ruby does 
>> not run on these two OS or at least, that not known tests have been done on 
>> these OS. 
>>
>>
> Android runs on a modified Linux kernel, but it provides a very different 
> environment than what most people refer to as Linux.  The Free Software 
> Foundation prefers to describe the latter as "GNU/Linux", and this is one 
> reason why.  You may find their explanation useful: 
> http://www.gnu.org/gnu/gnu-linux-faq.html#linuxsyswithoutgnu.
>
> With that said, there are at least two Ruby implementations for Android, 
> and probably more.  You likely can run Facter and the Puppet agent on one 
> of these, though I have never heard of anyone doing so.  The issue is not 
> so much with these pieces themselves, but with the OS-specific plugins on 
> which they rely to do any actual work.  The sense in which Android is Linux 
> (i.e. that it runs on the Linux kernel) is not helpful in this regard.
>
> On the other hand, if Puppet and Facter themselves will indeed run on one 
> of the Android Rubies, then it should be possible to implement any missing 
> plugins for features you need.  Individual plugins are not hard to write, 
> but I cannot predict how much work the overall task would require.
>
> The situation is similar for iOS as for Android.  There is at least one 
> Ruby for iOS, but iOS is not OS X.  You may need to write custom plugins.
>
> Puppet is reported to run on Windows 8, although it was not (yet) 
> officially supported on that OS the last I heard.  I'm not certain, 
> however, whether that applies to Win8 on ARM, which is a lot more 
> restricted than Win8 on x86[_64].  It boils down to the same question as in 
> the other two cases, except here I am unclear about whether there is a Ruby 
> that runs on Win8/ARM.
>
>
> 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.




[Puppet Users] Re: Copying a 900 mb file to Windows !!!

2013-03-13 Thread joe
I wouldn't even do this with a file resource. I'd write a small script to 
pull it down from a web server and install it then have puppet run that as 
an exec. I'd also have the script remove the update when it's done since 
you probably don't want 900mb on disk for no reason.

On Wednesday, March 13, 2013 7:38:49 AM UTC-6, Rakesh K wrote:
>
> Hi,
>
> I am writing a puppet manifest to install a service pack on windows, what 
> I observe is that in case the exe file is withing 50 - 70 Mb the transfer 
> to windows happens without any issues. But the current service pack 
> "windows6.1-KB976932-X64.exe" is around 900 Mb. My manifest is as follows
>
> file { 'c:/temp/windows6.1-KB976932-X64.exe':
> ensure => 'file',
> mode => '0755',
> owner => 'Administrator',
> group => 'Administrators',
> source => 'puppet:///modules/hotfix/windows6.1-KB976932-X64.exe',
> }
> I am getting the error below
>
> err: 
> /Stage[main]/Hotfix::Win2k8x64_sp1/File[c:/windows6.1-KB976932-X64.exe]/ensure:
>  
> change from absent to file failed: Could not set 'file on ensure: end of 
> file reached at /etc/puppet/modules/hotfix/manifests/win2k8x64_sp1.pp:26
>
> Please suggest
>

-- 
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: Installing a tarball using Puppet

2013-03-14 Thread joe
What llowder said. But he meant fpm, not fom:

https://github.com/jordansissel/fpm

On Thursday, March 14, 2013 3:40:20 PM UTC-6, llowder wrote:
>
>
>
> On Thursday, March 14, 2013 1:20:39 PM UTC-5, ridha gadhgadhi wrote:
>>
>> Hi all,
>>
>> I want to install opensaf from a tar file. Below, the content of my 
>> script shell:
>>
>>
>> ---
>> tar -xvf opensaf
>> cd opensaf 
>> ./configure --disable-tipc
>> make
>> make install
>>
>> 
>>
>> Any help will be much appreciated !
>>
>>
> You have 2 options. You can put what you did above in a shell script, and 
> thenuse a file to push the tarball and the shell script, then exec to run 
> the script.
>
> The BETTER option is to use fom or whatever and build a package (rpm, deb, 
> whatever) and then install that using a package resource from a local repo.
>  
>
>> Regards,
>>
>> --Ridha
>>
>

-- 
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: setting up default param value to all instances of a specific resource type

2013-03-18 Thread joe
There's no way to have the defaults in the top scope if you put them in a 
module. Module implies class, which implies a scope under top scope.

Site.pp would be the appropriate place, but keep in mind there is no way to 
"enforce" these defaults.

There's a fairly common practice these days of setting resource defaults in 
a class when you have multiple resources with the same parameters. I 
believe setting any defaults at a lower scope will cause puppet to ignore 
the ones set at the higher scope (not to merge them), so it's likely 
there's not a good solution to what you're trying to do short of a commit 
hook that denies any defaults outside site.pp.

On Monday, March 18, 2013 6:01:10 AM UTC-6, david...@gmail.com wrote:
>
> hi,
>
> Specifically I would like to have something like top scope resource 
> defaults so as to enforce,... well,... default behaviors across our modules
>
> for example, with the exec type: Exec { logoutput => on_failure } 
>
> However our puppet code base is rather extensive and the responsibility 
> for it is "distributed", so I was wondering if there was a way to set those 
> up in one place and affect all class and type instances across our 
> deployments.
>
> The only way I can think I can think of would be to declare it at the top 
> level of the site.pp but I would rather have in a module (we have base 
> modules which get installed on every nodes)
>
> is there any other option?
>
> thanks you,
> 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] Inherit two classes?

2013-03-18 Thread joe
Better practice is to expose the functionality of those classes through 
defines or parameterized classes. 

For instance, use a define like apache::vhost in the puppetlabs/apache 
module:
https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/vhost.pp

That way, all you have to do is use the define (no need to include or 
require the apache class at all), and all the relationships are handled 
internally in the apache module.

Similarly, a define that allows you to create a database instead of a class 
that just installs mysql.

This has the benefit of being reusable easily for different purposes and it 
also keeps you from having to have internal knowledge of the apache and 
mysql modules to make use of them. Otherwise, you still have to know *how* 
things are done in the apache and mysql modules, when really you just want 
a website or a database. 

On Monday, March 18, 2013 2:34:18 PM UTC-6, Matthew Burgess wrote:
>
> On Mon, Mar 18, 2013 at 7:48 PM, JamieC 
> > 
> wrote: 
>
> > Is it possible to 
> > define that "website" requires these additions? Such as; 
> > 
> > class website inherits httpd, mysqld { 
> > 
> > ... 
> > 
> > } 
>
> Yes.  Try: 
>
> class website { 
> ... 
> require => Class['httpd', 'mysqld'] 
> } 
>
> I personally prefer more fine-grained dependencies though: 
>
> class website { 
> ... 
> require => Service['httpd', 'mysqld'] 
> } 
>
> The idea here is that you don't require the class itself, but require 
> some resource declared in that class.  I've assumed here that each of 
> your classes declares a service for their respective daemon. 
>
> See also 
> http://docs.puppetlabs.com/puppet/3/reference/lang_relationships.html#syntax 
>
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Managing "" entries in httpd.conf with Puppet.

2013-04-03 Thread joe
Simple answer: don't. Use apache's conf.d construct to manage virtual hosts 
for each so they can contain their own config. See the puppetlabs apache 
module:

https://github.com/puppetlabs/puppetlabs-apache

On Wednesday, April 3, 2013 10:57:30 AM UTC-6, Cesar Covarrubias wrote:
>
> So I am working on deploying Puppet for our environment, and I have hit a 
> snag. We have a few applications hosted on Apache, each with different 
> "" entries. There is no way to standardize them across all of 
> our application pools and they often overlap. I know I can have a custom 
> template for each type of application, but it would be nice to make it as 
> generic as possible. 
>
> How do you manage multiple "" tags in httpd.conf via Puppet?
>  

-- 
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: Puppet parameterized class - include for declaration?

2013-04-09 Thread joe
You can include a parameterized class as long as all it's parameters have 
default values.

On Monday, April 8, 2013 3:10:03 PM UTC-6, Shantanu wrote:
>
>
> The parameterized classes guide mentions that a parameterized class is 
> declared using following syntax [1]:
>
> class {'classname': }
>
>
> But the puppetlabs postgresql 
> modulementions that a 
> parameterized class '
> postgresql::server'
>  
> can be declared using 'include' syntax [2]. 
>
> So is 'include' syntax supported for parameterized classes now?
>
> --
> Shantanu
>
>
> 1. http://docs.puppetlabs.com/guides/parameterized_classes.html
> 2. https://github.com/puppetlabs/puppet-postgresql#setup
>
>
>

-- 
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: testing static manifests

2013-04-09 Thread joe
Testing of puppet manifests is done using rspec.

http://rspec-puppet.com/

https://puppetlabs.com/blog/the-next-generation-of-puppet-module-testing/

On Tuesday, April 9, 2013 1:46:32 PM UTC-6, Bernardo Costa wrote:
>
> I would like to know how do people test a manifest that is basically 
> static without any parameter. By testing it, I mean not only check the 
> syntax or any invalid directive, but if the configuration there written is 
> implementing the expected behaviour when used. Of course, one way is just 
> point a machine to my puppet master and see that it has the right 
> configuration. But wouldn't exist another way to check this ?

-- 
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: puppet apache module dependency cycle

2013-04-24 Thread joe
Just declare or include apache without the chaining syntax. Should work 
fine.

include apache
class {'apache::mod::php': }

On Wednesday, April 24, 2013 4:22:21 PM UTC-6, jmar...@gmail.com wrote:
>
>
> I am trying to use puppetlabs apache module on CentOS to install mod php 
> package.
>
>class {'apache::mod::php':  }
>
> It returns error "Error: Could not find dependency Package[httpd] for 
> A2mod[php5]". I am using Puppet 3.1 version. 
>
>
>
> Do I need to call class{'apache': } explicitly to get mod-php install 
> working? If I try that as follows then it returns dependency cycle error. 
> Can someone provide an example usage to install mod-php and handle main 
> httpd package install as well?
>
> class {'apache':} -> class {'apache::mod::php': }
>
> Error: Could not apply complete catalog: Found 1 dependency cycle:
> (A2mod[php5] => Service[httpd] => Class[Apache] => Class[Apache::Mod::Php] 
> => Apache::Mod[php5] => A2mod[php5])
> Try the '--graph' option and opening the resulting '.dot' file in 
> OmniGraffle or GraphViz
>
> ~johan
>

-- 
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: Puppet and internal modules...

2013-04-25 Thread joe
One thing you certainly need to do is define a clear line of what puppet 
will and will not do in your environment. 

Puppet is not well suited to code deployment. It is extremely good at 
maintaining the environment in which code runs.

I would allow contributions from your dev team liberally, as long as they 
are only using puppet to maintain the environment and do so in a way that 
the rest of the organization can make use of their work.

On Thursday, April 25, 2013 2:45:51 PM UTC-6, Gavin Williams wrote:
>
> Afternoon/Evening all
>
> It looks like Puppet is starting to get some traction within my 
> organisation, with several other teams asking what Puppet can do for them 
> :-) 
>
> The main use I'm getting asked about is one touch deployment of our 
> products by Dev teams... 
>
> On the surface it shouldn't be too hard, and I've already got a model in 
> mind. 
>
> However one of the considerations is making the Puppet code maintainable 
> by Dev aswell as me in Ops/Implementation... 
>
> Currently, I've got one model that does all our Puppet stuff, such as 
> based configuring servers, installing oracle, installing monitoring, 
> configuring databases, etc. I do hook in some common modules as and when 
> needed. 
>
> So i can either continue this model and build it out to handle product 
> deployments aswell. 
> Or I can turn it on its head, and write modules specific to the product 
> deployment, pulling in stuff from our core model where useful... 
> This means that Dev can maintain their own product modules, and with a 
> liberal spread of continuous integration testing, should be able to handle 
> new product module requirements separately to core model changes :-) 
>
> So, thoughts welcome. 
> Any pros/cons to above? Or any better way of handling it? 
>
> Thanks in advance for any responses. 
>
> Regards
> Gavin 
>
>

-- 
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: Using Puppet to trigger a script when error occurs on log file

2013-05-07 Thread joe
This is not something puppet is intended to do.

For one, puppet makes periodic runs and does not respond to changes on the 
system in realtime. So best case, your app would get restarted within 30 
minutes (or whatever your runinterval is) of an error occuring, but not 
immediately upon that error occurring.

Second, puppet can restart a service because another resource it manages 
changed (think config files), but it doesn't have a mechanism in the 
service provider to restart based on other conditions.

Puppet is very good about setting up an environment and maintaining its 
state, but it's not an application monitoring/orchestration tool.

On Tuesday, May 7, 2013 9:19:04 AM UTC-6, Nicola Zanetti wrote:
>
> Hello everyone,
> I'm using Puppet on my Ubuntu servers and I would like it to restart a 
> process whenever an error occurs while running an application. The error 
> can be detected looking at the logs of the application of course, but I 
> don't want to parse the log file to detect it. Is there a way using Puppet, 
> to trigger a script when something happens in a log file without having to 
> parse it ? 
>
> Many thanks for your support,
>
>
> Best,
>
> Nicola
>

-- 
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: define and exported resources - giving wrong template content

2013-05-08 Thread joe
jcbollinger is correct.

Templates are evaluated on the master in response to a catalog request. Any 
facter values used in the template will be the values from the host 
requesting the catalog. 

In your nagios module, you export the file resource (with it's contents) 
from the server with the correct values. This is because the resource is 
*evaluated* on the client run and then exported.

In your defined type, you are not actually evaluating the template contents 
because you wrap it in a defined type. This means the resources in the 
defined type are exported from the client, but not evaluated until the 
server requests its catalog. So you end up with values from the server 
instead of the client.

On Wednesday, May 8, 2013 1:57:05 PM UTC-6, jcbollinger wrote:
>
>
>
> On Wednesday, May 8, 2013 9:22:16 AM UTC-5, Klavs Klavsen wrote:
>>
>> Hi,
>>
>> I have an odd problem - I have a define, as an exported resource. when 
>> puppet creates them on the central gdash host - it creates them with the 
>> correct (client) hostname (f.ex. cat 
>> /var/www/gdash/graph_templates/dashboards/hosts/p-web01/dash.yaml) - but 
>> the content has the central gdash hostname in them instead (of f.ex. 
>> p-web01 etc.).
>>
>> I do the same with nagios config - and there it works fine (only diff I 
>> can see, is that I do export the file resource directly (with a tag), 
>> instead of doing it in a define).
>>
>> ##definition - run on hosts
>>   @@gdash::hostgraphs { "${::hostname}": }
>>
>> ##profile on gdash server
>>   Gdash::Hostgraphs <<| |>> { }
>>
>> ##gdash::hostgraphs
>>
>> define gdash::hostgraphs () {
>>   $tplpath = "/var/www/gdash/graph_templates/dashboards"
>>   $hostpath = "$tplpath/hosts/$name"
>>   #file { "$tplpath/hosts": ensure => directory }
>>   file { "$tplpath/hosts/$name": ensure => directory, require => 
>> File["$tplpath/hosts"] }
>>   #$graphs = [  'dash.yaml', 'cpu.graph', 'io.graph', 'iops.graph', 
>> 'load.graph', 'memory.graph', 'nettraf.graph', 'sockets.graph']
>>   file { "$hostpath/dash.yaml": content => template('gdash/dash.yaml') }
>>   file { "$hostpath/cpu.graph": content => template('gdash/cpu.graph') }
>>   file { "$hostpath/io.graph": content => template('gdash/io.graph') }
>>   file { "$hostpath/iops.graph": content => template('gdash/iops.graph') }
>>   file { "$hostpath/load.graph": content => template('gdash/load.graph') }
>>   file { "$hostpath/memory.graph": content => 
>> template('gdash/memory.graph') }
>>   file { "$hostpath/nettraf.graph": content => 
>> template('gdash/nettraf.graph') }
>>   file { "$hostpath/sockets.graph": content => 
>> template('gdash/sockets.graph') }
>> }
>>
>> The templates all look kinda like this 
>> (modules/gdash/templates/dash.yaml):
>> :name: <%= hostname %>
>> :description: Graphs for <%= fqdn %>
>>
>> Anyone have any ideas?
>>
>> It's puppet v3.1.1
>>
>>
>
> I'm not sure I would have predicted the behavior you see, but it makes 
> sense.  When you export a resource you are exporting the resource type and 
> parameters.  When you later import that resource, it is evaluated in the 
> context of the importing host, just as you see.  Evidently, if you want to 
> convey data from the exporter to the importer then it must be carried by 
> parameters of the exported resource.
>
>
> 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] Running all apt source and update operations first, best practice.

2013-05-10 Thread joe
This can be achieved without stages if you put the relationship inside 
site.pp outside any class scope.

On Friday, May 10, 2013 8:25:58 AM UTC-6, jcbollinger wrote:
>
>
>
> On Thursday, May 9, 2013 10:23:25 PM UTC-5, Nan Liu wrote:
>>
>> On Thu, May 9, 2013 at 11:52 AM, James Kyle  wrote:
>>
>>> I've run into several incidences where a module attempts to install a 
>>> package before the apt::source is added or an update is run. Result is a 
>>> bunch apt errors and explosions.
>>>
>>> Basically what should be done is all the apt::sources are added and and 
>>> an update run _before_ any packages are installed to ensure you're pulling 
>>> from the repos you want. 
>>>
>>> I've gone through several iterations in my attempt to achieve that 
>>> behavior. The one that works best so far is stages and wrapper classes. 
>>> Here's a terse example of what it looks like:
>>>
>>> class myorg::common {
>>>   include stdlib
>>>
>>>   Apt::Source {stage => "setup"}  
>>>
>>>   apt::source { 'puppetlabs':
>>> location   => 'http://apt.puppetlabs.com',
>>> repos  => 'main',
>>> key=> '4BD6EC30',
>>> key_server => 'pgp.mit.edu',
>>>   }
>>>
>>>   Exec['apt_update'] -> Package<|  title != 'ubuntu-cloud-keyring' |>
>>> }
>>>
>>> node 'foo.bar.com' {
>>>   include stdlib
>>>   
>>>   class {'myorg::common': stage => "setup"}
>>> }
>>>
>>>
>>> One thing that bothers me is you have to declare the stage for 
>>> myorg::common in every node that uses it. And as the name implies, that's 
>>> every node.
>>>
>>> Is there a way to get rid of that duplication? I've thought of node 
>>> inheritance, but the docs seem to strongly steer you away from that pattern.
>>>
>>
>> Doesn't the relationship do the right thing without stages?
>>
>
>
> It would depend on whether and how stages are used elsewhere in the 
> manifest set.  With stages it's often "in for a penny, in for a pound."  
> Generally speaking, though, it should be possible to do this sort of thing 
> (or anything, actually) without stages.
>
>  
>
>> Does this work?
>>
>> class myorg::common (
>>   $staging  = 'setup',
>> ) { ...
>>
>> Nan
>>
>
>
> Provided that all of the relevant Apt sources are managed via Apt:::Source 
> resources, and that no virtual Apt::Source or Package resources are 
> declared without elsewhere being realized, this declaration should work:
>
> Apt::Source<| |> -> Exec['apt_update'] -> Package<| |>
>
> That declaration is not itself affected by or dependent on stages, but it 
> is possible for the referenced resources to be assigned to stages in such a 
> way that the chain closes one or more dependency cycles.  Such cycles would 
> reflect an error in the stage assignments, however, for the chain 
> expression succinctly and precisely describes the requested resource 
> application order; as long as it does so, it *defines* the correct 
> orders.  It would be sufficient to make that declaration once, in some 
> central place, but not harmful to make it multiple times.
>
> There are all manner of tweaks and accommodations that could be applied to 
> handle special cases, such as when there are virtual Apt::Source or Package 
> resources must remain unrealized, but the chain above captures the 
> essential essence of the required declaration.
>
>
> 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.




[Puppet Users] Re: RHEL patches broke my puppetd

2013-05-10 Thread joe
You should upgrade from 0.25.5. It is quite old and no longer supported.

On Friday, May 10, 2013 2:17:00 PM UTC-6, dsdtas wrote:
>
> Earlier this week, I applied RHEL patches to a couple of dev server with 
> puppet 0.25.5 and now I can no longer run puppetd commands without 
> constantly getting the message: 
>
> [root@dev2 ~]# puppetd --test --verbose --noop
> notice: Run of Puppet configuration client already in progress; skipping
>
> Killing the process and then clearing out the lock file every time is not 
> really an option.  Also, I am finding that puppetd --enable is not having 
> any effect on my problem
>
> I am guessing that some puppet dependency got updated by the update from 
> RHEL 5.5 to 5.6.  Any suggestions on how to troubleshoot this?
>
> 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: module dependancy

2013-05-15 Thread joe
In class myapp::install, just require the other class:

require Class['pythonpip::install']

before the package statement.

On Tuesday, May 14, 2013 12:36:22 PM UTC-6, Matt F wrote:
>
> I have two modules, and I'm having some dependacy problems: 
>
> 1 - Install python "pip":
>
> class pythonpip::install {
> file {"/root/.pip":
> ensure => directory,
> owner  => root,
> group  => root,
> mode   => 755
> }
> file {"/root/.pip/pip.conf":
> ensure  => present,
> source => 'puppet:///modules/pythonlinux/pip.conf',
> mode=> 0644,
> }
> }
>
>
> 2 - install some python packages via "pip":
>
> class myapp::install {
> package {
> "mechanize":
> provider => pip;
> "numpy":
> provider => pip;
> "pandas":
> provider => pip;
> "reportlab":
> provider => pip;
> }
> }
>
> I want to make sure tha the "pythonpip::install" is alway run before the 
> "myapp::install". How can I do that?
>

-- 
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: How to apply to all hosts with exception list.

2013-05-16 Thread joe
The easiest thing to do would to make a subclass called cups::enabled or 
similar and use an override:

class cups::enabled inherits cups{  # The inherits is important

  Package['cups']{
ensure => 'present,
  }

  Add service and config file resources here

}

The problem with trying to use hiera is it just gets you the package ensure 
parameter. With the override, you can add in the service and config file 
resources as well.

On Thursday, May 16, 2013 6:33:25 PM UTC-6, Stephen Wallace wrote:
>
> Hi all,
>
> I know that there are likely a few ways to solve the following. I just 
> don't know what the best way may be :)
>
> We're trying to work out how do something similar to the following 
> scenario.
>
> How do we apply a policy to uninstall CUPS from all servers, except for  a 
> configurable group of "some".
>
> To put it another way, how can we have an policy that will configure CUPS 
> on a known list of servers (hiera array perhaps?), and uninstall from all 
> other $kernel=Linux machines?
>
> Best to get the install list right first then feed via ENC, or?
>
> Regs,
>
> Stephen
>  

-- 
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: Rhel based distro and multiple package version installed

2013-05-20 Thread joe
Please heed the advice of others concerning packaging.

As to your require question, you can require a defined type just like any 
other resource:

require => Tomcat::Home['6.0.37']



On Saturday, May 18, 2013 2:38:47 AM UTC-6, Luca Gervasi wrote:
>
> Hello,
>
> i'm starting using Puppet on my personal lab. There I'd like to reproduce 
> a multi base tomcat installation as follows:
>
> * Multiple jdk installations (multiple 1.6.x, multiple 1.7.x)
> * Multiple tomcat installations (multiple 6.0.x, multiple 7.0.x)
>
> Here is the problem:
> using the Package definition, i'm unable to have multiple jdk version (as 
> 1.6.4 supersedes 1.6.3, leaving only the last one installed correctly), so 
> I created a custom define that uses a File definition to copy multiple 
> directories (/opt/java/jdk-$version) from my puppetmaster (recurse + purge) 
> and used this as follows:
>
> tomcat::home { "6.0.37": version => "6.0.37"}
> jdk::home { "1.6.24": version => "1.6.24"}
>
> but i'm unable to create a simple check on my tomcat istances like a 
> require tomcat-6.0.37.
>
> How can i accomplish what i need?
>
> Thanks in advance.
>
> Luca Gervasi
>
>

-- 
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] Run a File resource only if another file is missing

2013-05-31 Thread joe
You should really reconsider how you are going about things and organizing 
your resources if you have to do stuff like this.

Puppet was never meant to be reactionary in this sense. It's entire purpose 
is to define the state of the system and enforce that state, not to respond 
to the state of the system conditionally.

On Friday, May 31, 2013 10:01:19 AM UTC-6, John Naggets wrote:
>
> Thanks guys for your input. That's correct I am looking to act upon 
> another file's nonexistence... I will go with facter.
>
> On Friday, May 31, 2013 2:57:56 PM UTC+2, Matthias Saou wrote:
>>
>> Hi, 
>>
>> Indeed, I had missed that John was mentioning two different files 
>> ("config.php" vs. "autoconfig.php"). In that case, my only bit of 
>> (useless) advice is : You're not using puppet in the way it's most 
>> efficient, as it's not meant to manage nodes based on changes it 
>> doesn't make itself. 
>>
>> Custom fact, it is... 
>>
>> Matthias 
>>
>> Dan White  wrote: 
>>
>> > That is an excellent example, but I think you miss the original point: 
>> > 
>> > Your example deals with only one file resource - the dot-gitconfig 
>> > file Suppose you only wanted to perform this action if git was 
>> > installed on the system, and do nothing if it was not ? 
>> > 
>> > This additional requirement puts it closer to the original question 
>> > and this is where a custom fact is called for in the opinion of 
>> > several folks on the list including myself. 
>> > 
>> > If you can offer an example that demonstrates otherwise, I would 
>> > welcome it. I do not believe it possible without the custom fact and 
>> > I have several hours of frustrated tinkering to show for it.  I 
>> > wanted to set a parameter in a config file but only if (the config 
>> > file exists and/or the associated package is installed) and found I 
>> > could not do it completely from within the manifest. 
>> > 
>> > “Sometimes I think the surest sign that intelligent life exists 
>> > elsewhere in the universe is that none of it has tried to contact 
>> > us.” Bill Waterson (Calvin & Hobbes) 
>> > 
>> > - Original Message - 
>> > From: "Matthias Saou"  
>> > To: puppet...@googlegroups.com 
>> > Sent: Friday, May 31, 2013 4:00:15 AM 
>> > Subject: Re: [Puppet Users] Run a File resource only if another file 
>> > is missing 
>> > 
>> > There are other ways. None are nice and clean, but a custom fact just 
>> > for this seems overkill. 
>> > 
>> > Here's a quick example of how I've implemented creating a default 
>> > ~/.gitconfig for users if it doesn't exist, but not modify it if it's 
>> > already there or has been modified. 
>> > 
>> > $gitconfig_user_name = $mymodule::uservar::fullname[$title] 
>> > $gitconfig_user_email = "${tit...@example.com" 
>> > file { "${home}/.gitconfig": 
>> >   owner   => $owner, 
>> >   group   => $group, 
>> >   mode=> '0644', 
>> >   require => Exec["create-gitconfig-${title}"], 
>> > } 
>> > exec { "create-gitconfig-${title}": 
>> >   command => template('mymodule/user/gitconfig.erb'), 
>> >   require => User[$title], 
>> >   creates => "${home}/.gitconfig", 
>> > } 
>> > 
>> > The gitconfig.erb has the following content : 
>> > /bin/cat > <%= home %>/.gitconfig << EOF 
>> > [user] 
>> > name = <%= @gitconfig_user_name %> 
>> > email = <%= @gitconfig_user_email %> 
>> > EOF 
>> > 
>> > Basically, just don't have either 'source' nor 'content' for your file 
>> > resource, and create the initial content using an exec with the 
>> > 'creates' condition. 
>> > 
>> > Matthias 
>> > 
>> > Dan White  wrote: 
>> > 
>> > > Short Answer: You need to create a custom fact that would drive the 
>> > > decision to create the new file resource. 
>> > > 
>> > > I just went thru this issue and also performing an action based on 
>> > > whether or not a package (RPM in my case) is installed. 
>> > > 
>> > > Same answer to both. 
>> > > 
>> > > For the existence of a file, you can do this: 
>> > > 
>> > > #!/bin/bash 
>> > > test -f /var/www/owncloud/config/config.php 
>> > > rc=$? 
>> > > echo "is_my_file_there=${rc}" 
>> > > 
>> > > That goes into /etc/facter/facts.d/ as an executable shell script 
>> > > and then in your manifest: 
>> > > 
>> > > if $::is_my_file_there != 0 { 
>> > >file { 'autoconfig.php': 
>> > >. 
>> > >} 
>> > > } 
>> > > 
>> > > 
>> > > “Sometimes I think the surest sign that intelligent life exists 
>> > > elsewhere in the universe is that none of it has tried to contact 
>> > > us.” Bill Waterson (Calvin & Hobbes) 
>> > > 
>> > > - Original Message - 
>> > > From: "John Naggets"  
>> > > To: puppet...@googlegroups.com 
>> > > Sent: Thursday, May 30, 2013 4:04:29 PM 
>> > > Subject: [Puppet Users] Run a File resource only if another file is 
>> > > missing 
>> > > 
>> > > Hi, 
>> > > 
>> > > I would like to run the File resource below: 
>> > > 
>> > > file { 'autoconfig.php': 
>> > > path => '/var/www/owncloud/co

[Puppet Users] Re: Status of bug #8040?

2013-06-05 Thread joe
Using anchors happens alot less than you think if you write minimal 
functionality into your subclasses.

You don't put anchors in subclasses to anchor them to the parents. You may 
need anchors in subclasses if they include other classes whose resources 
need to be ordered, but this really shouldn't happen much and can usually 
be handled in the parent class as part of the main anchoring (i.e. put 
apache2 in foo instead of foo::web)

While it's true that many modules on the forge do not appropriately use 
anchoring, many of the most popular ones do and this situation improves 
constantly.

On Wednesday, June 5, 2013 10:57:54 AM UTC-6, Dennis Jacobfeuerborn wrote:
>
> Hi,
> what plans are in place to deal with bug #8040: 
> http://projects.puppetlabs.com/issues/8040
>
> I have some Puppet experience but I'm also looking at Chef and Ansible 
> right now in order to determine which configuration management to commit to 
> and being able to build and re-use components is a major issue.
> Right now this bug seems to make it almost impossible to build non-trivial 
> components and the workaround mentioned isn't really useful as a) it means 
> you have to lace each and every class with dependencies just to anchor them 
> to their parents an b) you will not be able to use components from e.g. 
> puppet-forge because they will most likely miss this anchoring as well.
>
> So what is the story here? Is this being worked on in some concrete way or 
> is re-usability not something that is considered important in the Puppet 
> ecosystem?
>
> Regards,
>   Dennis
>

-- 
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: less drastic alternative to fail()?

2013-06-11 Thread joe
You can put the resources inside the class into a big if statement that 
checks the vars and does a notify if the class can't be applied.

I've seen this in a few modules.

On Tuesday, June 11, 2013 3:53:13 PM UTC-6, mpou...@afilias.info wrote:
>
> I have a few cases of error checking to make sure parameters supplied to 
> my classes and defined types where the no-success option is to run the 
> fail() function with a meaningful error.  This seems to cause the entire 
> agent run to fail as if the manifest couldn't be generated.  Does anyone 
> know of an equivalent that would cause just that class to fail and stop 
> processing (and obviously skip anything that depends on it) but allow the 
> rest of the agent run to proceed as normal? 
>
> Is that even desirable, or am I missing edge cases where that would break 
> things?
>

-- 
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: Not able to transfer the file puppet master to the client

2013-06-12 Thread joe
You don't import .conf files in your site.pp. Only .pp files.

The fileserver config file is not valid puppet syntax. Puppet will find and 
use it on it's own.

On Wednesday, June 12, 2013 7:50:12 AM UTC-6, Ramesh Mahimalur wrote:
>
> Hello,
>
> I have installed two VMs one for master and another for client. When i am 
> trying to trying to transfer a file from puppet master to the client i am 
> getting the following error.
>
> err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Could not parse for environment production: Syntax error at '['; expected 
> ']' at /etc/puppetlabs/puppet/fileserver.conf:1 on node client2.puppet.com
> warning: Not using cache on failed catalog
> err: Could not retrieve catalog; skipping run
>
>
> Below i my fileserver.conf
>
> [files]
> path /etc/puppetlabs/puppet/modules/files
> allow *
>
> [modules]
> path /etc/puppetlabs/puppet/modules
> allow *
>
>
> This is my manifest site.pp
>
>
> # specified in the console for that node.
> import "/etc/puppetlabs/puppet/modules/*.pp"
> import "/etc/puppetlabs/puppet/fileserver.conf"
> #include files
> node default {
>   # This is where you can declare classes for all nodes.
>   # Example:
>   #   class { 'my_class': }
> }
> node client2 {
> include resolver
> include service
> include useradd
> include transferfile
> }
>
>
> And this is my module where i defined the class
>
> class transferfile {
>  file { '/root/files/yum.conf':
> ensure => 'present',
> mode => '0755',
> owner => 'root',
> group => 'root',
> force => 'true',
> source => "puppet:///modules/files/yum.conf"
>}
> }
>
>
> Can anyone please help me, how to solve this issue. I went through many 
> forums but didn't find a correct way to resolve this issue. Could you 
> please help me out with this as i have to finish this work ASAP.
>
> Thanks,
> Ramesh M
>

-- 
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: How to make a package dependant on a class for the repository.

2013-06-20 Thread joe
Does your repos class have a bunch of classes included? If so, those are 
not caught by the require and you need to use the anchor pattern:

http://projects.puppetlabs.com/projects/puppet/wiki/Anchor_Pattern

The ordering (no matter how you do it) only orders the *resources* in that 
class. Not the resources in classes that are *included* in your repos class.

On Wednesday, June 19, 2013 6:00:03 PM UTC-6, Stack Kororā wrote:
>
> Greetings!
>
> tl;dr Why doesn't require=>Class work?
>
> I have a module I built that I creatively called "repos". This does a 
> number of things for me:
> * I have many systems on different networks. Depending on the network 
> depends on which repository the servers get their packages from.
> * I have many OS's (RHEL, Scientific, CentOS, SuSE) and several different 
> releases of those OS's (ex: RHEL6 vs RHEL5).
> * Some systems get repositories that others don't (ex: VMware guests get 
> the ESXi guest tools repo).
> * We roll our own packages for some software; only systems of a certain 
> type get these repos.
> * ect.
>
> This class does a wonderful job for me. I barely have to do anything in 
> the node definition other than "class { 'repos': } " and it just figures 
> out which systems get what repo's based on facter and various parameters 
> (like current network IP). 
>
> Here is the problem though.
> package {["htop":ensure=>installed, }
>
> Chances are *really* good that on first runs when the repo hasn't yet been 
> created, what will happen is:
> * Error: can't find htop.
> * Installing EPEL
> *Done!
>
> Well that isn't what I want, obviously. Thus I tried:
> package {["htop":ensure=>installed,require=>Class['repos'],}
>
> Still the same result as before. It never fully configures the repo before 
> trying to install. Then I tried:
> package {["htop":ensure=>installed,require=>Yumrepo['EPEL'],}
>
> It works!! Hooray! And then I hit a failure point. This next statement 
> works for Scientific Linux but fails for CentOS6 because a CentOS system 
> won't have the SL6 repo!
> package {["tuned":ensure=>installed,require=>Yumrepo['SL6'],}
>
> I have come up with two "solutions".
> 1) Change all the repos to use generic names like "Base" and "Security". 
> While it is a big bandaid, it doesn't really fix the problem as there is 
> still potential for packages to conflict.
>
> 2) Find out why "require=>Class['repos']" doesn't work and fix it. This 
> would solve all my problems if the repos were run and configured properly 
> before packages were installed. The only "problem" would then be to make 
> sure I am not trying to install a package that legitimately doesn't exist 
> in the repos (like tuned on a CentOS 5 box) but that would fall squarely 
> into a PEBKAC and there is only so much I can script to catch those. :-)
>
> Can anyone help me with this please? Any ideas on how I can fix this?
>
> 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] Puppet update to 3.6.1 causes Error 400 on SERVER: no 'environments' in ...

2014-05-27 Thread joe
After upgrading to Puppet 3.6.1 I get this error:

Warning: Error 400 on SERVER: no 'environments' in 
{:root_environment=>#, 
:current_environment=>#} at top of [[0, nil, nil]]

Any ideas?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/da9dc89b-0f5c-4807-b113-32d0bbd233fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet update to 3.6.1 causes Error 400 on SERVER: no 'environments' in ...

2014-05-30 Thread joe
How did you not define any environments. I've removed the 
/etc/puppet/environments folder and have no envs. set anywhere else. Still 
happens with WebRick.

On Tuesday, May 27, 2014 1:31:34 PM UTC-2:30, Atom Powers wrote:
>
> I struggled with this for a while on Friday.
> The error doesn't occur until a few minutes after WebBrick is started.
> I found that if I don't define an environment for the host then the error 
> doesn't occur.
> I wasn't able to get it working with an environment, even with directory 
> environments setup correctly.
>
>
> On Tue, May 27, 2014 at 6:23 AM, Anton Lindstrom  > wrote:
>
>> There's a ticket open for that issue at 
>> https://tickets.puppetlabs.com/browse/PUP-2659
>>
>> // Anton
>>
>>
>> On Mon, May 26, 2014 at 7:21 PM, > > wrote:
>>
>>> After upgrading to Puppet 3.6.1 I get this error:
>>>
>>> Warning: Error 400 on SERVER: no 'environments' in 
>>> {:root_environment=>#>> @config_version=nil, @manifest="/", @modulepath=[], @watching=true, 
>>> @name=:"*root*">, 
>>> :current_environment=>#>> @config_version=nil, @manifest="/", @modulepath=[], @watching=true, 
>>> @name=:"*root*">} at top of [[0, nil, nil]]
>>>
>>> Any ideas?
>>>
>>> -- 
>>> 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 .
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/puppet-users/da9dc89b-0f5c-4807-b113-32d0bbd233fd%40googlegroups.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  -- 
>> 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 .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/CAG_x02Y8B4kDhTsRqyaEMGa2U76ZzJ7MpMKqOVi2%3DTmeEOneig%40mail.gmail.com
>>  
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Perfection is just a word I use occasionally with mustard.
> --Atom Powers-- 
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/789a00eb-5df9-4bd7-9f68-74f714a7b0b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Node classification groups for Puppet Community edition?

2016-12-22 Thread Joe
Hi Guys, new to puppet. Wondering if htere are node classification groups 
for puppet community edition or if these are only available in the 
Enterprise version?

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/513209f9-ef54-4b82-8f18-5452ac4c5432%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Array Iteration for Community Edition of Puppet(3.8)

2016-12-31 Thread Joe
Hi All

Puppet v3.8.7 community on Ubuntu 14 LTS

I have been attempting to write a class to use the "file_line" type 
reference from the stdlib library to add multiple lines to a file if these 
lines are not present. 
I was attempting to do this with iteration using the each function and 
tried with static and Hiera arrays. After a few hours of failure I came 
across the docs for Puppet Enterprise that say this iteration capability 
was introduced in Puppet 4.

It looks like this, testdefs is an array in Hiera defined in the nodes yaml 
config

 each($testdefs) |$hline| {
   file_line { 'Append a line to /etc/testfile':
  ensure => present,
  line  => "$hline",
   path=> '/etc/testfile',
}
}

To be clear I am trying to.. 
iterate through a Hiera array 
pass each array member to the file_line type 
append this member to a file if it does not exist.  

Is there a way to do this with Puppet 3.x or should I just make a static 
class with multiple file_line types?

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/00b39e1e-9a7f-4bf1-b76c-33f6bb8aff78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Array Iteration for Community Edition of Puppet(3.8)

2017-01-01 Thread Joe
Hello Guys thanks for the replies..

Apologies for the top posting here.. the reply to post only includes my 
text. I am using the "puppetlabs-release-pc1-trusty.deb" apt source from 
puppet labs and the latest version is 3.8.7 as seen below. I am also using 
the puppetmaster-passenger package from the same repo. R.I Pienaarr said to 
use version 4 however I do not see puppetmaster 4 packages available.

puppetmaster:
  Installed: (none)
  Candidate: 3.8.7-1puppetlabs1
  Version table:
 3.8.7-1puppetlabs1 0
500 http://apt.puppetlabs.com/ trusty/main amd64 Packages
 3.8.6-1puppetlabs1 0
500 http://apt.puppetlabs.com/ trusty/main amd64 Packages


Am I missing something? How can I install the Puppetmaster 4 and 
Puppetmaster-passenger 4 packages on ubuntu server via repository?

Thanks again



On Saturday, December 31, 2016 at 10:05:49 PM UTC-7, Joe wrote:
>
> Hi All
>
> Puppet v3.8.7 community on Ubuntu 14 LTS
>
> I have been attempting to write a class to use the "file_line" type 
> reference from the stdlib library to add multiple lines to a file if these 
> lines are not present. 
> I was attempting to do this with iteration using the each function and 
> tried with static and Hiera arrays. After a few hours of failure I came 
> across the docs for Puppet Enterprise that say this iteration capability 
> was introduced in Puppet 4.
>
> It looks like this, testdefs is an array in Hiera defined in the nodes 
> yaml config
>
>  each($testdefs) |$hline| {
>file_line { 'Append a line to /etc/testfile':
>   ensure => present,
>   line  => "$hline",
>path=> '/etc/testfile',
> }
> }
>
> To be clear I am trying to.. 
> iterate through a Hiera array 
> pass each array member to the file_line type 
> append this member to a file if it does not exist.  
>
> Is there a way to do this with Puppet 3.x or should I just make a static 
> class with multiple file_line types?
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1877ddc2-f248-4206-b6d2-3544ef4cf57f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Array Iteration for Community Edition of Puppet(3.8)

2017-01-01 Thread Joe
Thanks R.I.

So iteration works with 3.8x with future parser. I am going to avoid 4 
until Debian builds it into their repositories.

So iteration works but not with file_line.. 

Here is the code.

hiera array
mod1::testdefs:
  - 'hello'
  - 'there'
  - 'friends'
##mod1  init.pp
each($testdefs) |$hline| {
   file_line { 'Append a line to /etc/testfile':
  ensure => present,
  line  => $hline,
   path=> '/etc/testfile',
}
}


##error is this
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Evaluation Error: Error while evaluating a Resource Statement, Duplicate 
declaration: File_line[Append a line to /etc/testfile] is already declared 
in file /etc/puppet/environments/test/modules/mod1/manifests/init.pp:48; 
cannot redeclare at 
/etc/puppet/environments/test/modules/mod1/manifests/init.pp:48

I tried putting the loop in the file_line type but that throws another 
error since it is not acceptable to file_line.

Is there any way around this that you guys are aware of?

Thanks

On Saturday, December 31, 2016 at 10:05:49 PM UTC-7, Joe wrote:
>
> Hi All
>
> Puppet v3.8.7 community on Ubuntu 14 LTS
>
> I have been attempting to write a class to use the "file_line" type 
> reference from the stdlib library to add multiple lines to a file if these 
> lines are not present. 
> I was attempting to do this with iteration using the each function and 
> tried with static and Hiera arrays. After a few hours of failure I came 
> across the docs for Puppet Enterprise that say this iteration capability 
> was introduced in Puppet 4.
>
> It looks like this, testdefs is an array in Hiera defined in the nodes 
> yaml config
>
>  each($testdefs) |$hline| {
>file_line { 'Append a line to /etc/testfile':
>   ensure => present,
>   line  => "$hline",
>path=> '/etc/testfile',
> }
> }
>
> To be clear I am trying to.. 
> iterate through a Hiera array 
> pass each array member to the file_line type 
> append this member to a file if it does not exist.  
>
> Is there a way to do this with Puppet 3.x or should I just make a static 
> class with multiple file_line types?
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/4912ca68-64e4-48d7-906e-923b70aabaa3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Array Iteration for Community Edition of Puppet(3.8)

2017-01-01 Thread Joe
Got it guys, the issue was with the file_line declaration as evidenced by 
the error. I made the declaration change with the variable and it worked. 

Thanks all for the help.

On Saturday, December 31, 2016 at 10:05:49 PM UTC-7, Joe wrote:
>
> Hi All
>
> Puppet v3.8.7 community on Ubuntu 14 LTS
>
> I have been attempting to write a class to use the "file_line" type 
> reference from the stdlib library to add multiple lines to a file if these 
> lines are not present. 
> I was attempting to do this with iteration using the each function and 
> tried with static and Hiera arrays. After a few hours of failure I came 
> across the docs for Puppet Enterprise that say this iteration capability 
> was introduced in Puppet 4.
>
> It looks like this, testdefs is an array in Hiera defined in the nodes 
> yaml config
>
>  each($testdefs) |$hline| {
>file_line { 'Append a line to /etc/testfile':
>   ensure => present,
>   line  => "$hline",
>path=> '/etc/testfile',
> }
> }
>
> To be clear I am trying to.. 
> iterate through a Hiera array 
> pass each array member to the file_line type 
> append this member to a file if it does not exist.  
>
> Is there a way to do this with Puppet 3.x or should I just make a static 
> class with multiple file_line types?
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/d149a7b7-8961-4107-a08c-d5aee633faba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Array Iteration for Community Edition of Puppet(3.8)

2017-01-02 Thread Joe
Thanks for the heads up Rob. I am using this repository from puppetlabs.
puppetlabs-release-pc1-trusty.deb

In this repository the latest is 3.8.7. You mentioned puppet releases 
puppet-agent and puppetserver version 4 in PC1. Even when I manually look 
in the repo there is no trace of puppetmaster 4 or puppet-agent 4. I 
manually browsed the main and PC1 package lists and I don't see the 
puppetmaster 4 or puppet-agent 4, probably I am missing something. Do you 
know where I can find the packages? 

On docs.puppet.com I find the links for upgrading from 3 to 4, is this the 
recommended material for upgrading?


   - *Upgrade: From Puppet 3.x* 
  - Get upgrade-ready 
  <https://docs.puppet.com/puppet/4.8/upgrade_major_pre.html>
  - Upgrade Puppet Server and PuppetDB 
  <https://docs.puppet.com/puppet/4.8/upgrade_major_server.html>
  - Upgrade 3.x agents 
  <https://docs.puppet.com/puppet/4.8/upgrade_major_agent.html>
  - Updating 3.x manifests for Puppet 4.x 
  <https://docs.puppet.com/puppet/4.8/lang_updating_manifests.html>
  - Post-upgrade clean-up 
  <https://docs.puppet.com/puppet/4.8/upgrade_major_post.html>
   
Thanks again

On Saturday, December 31, 2016 at 10:05:49 PM UTC-7, Joe wrote:
>
> Hi All
>
> Puppet v3.8.7 community on Ubuntu 14 LTS
>
> I have been attempting to write a class to use the "file_line" type 
> reference from the stdlib library to add multiple lines to a file if these 
> lines are not present. 
> I was attempting to do this with iteration using the each function and 
> tried with static and Hiera arrays. After a few hours of failure I came 
> across the docs for Puppet Enterprise that say this iteration capability 
> was introduced in Puppet 4.
>
> It looks like this, testdefs is an array in Hiera defined in the nodes 
> yaml config
>
>  each($testdefs) |$hline| {
>file_line { 'Append a line to /etc/testfile':
>   ensure => present,
>   line  => "$hline",
>path=> '/etc/testfile',
> }
> }
>
> To be clear I am trying to.. 
> iterate through a Hiera array 
> pass each array member to the file_line type 
> append this member to a file if it does not exist.  
>
> Is there a way to do this with Puppet 3.x or should I just make a static 
> class with multiple file_line types?
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/362627c8-55eb-45e3-9410-696dd0283f96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Array Iteration for Community Edition of Puppet(3.8)

2017-01-02 Thread Joe
Yes I am also an RPM man and only chose this route because I thought the 
correct path was puppet with passenger, but reading the docs now I see that 
puppet-passenger is not the path going forward and puppetserver is the way 
now. I installed puppetserver 2.7.2-1puppetlabs1. Is this "puppet 4"? 

I am a few days into puppet and so I am a bit confused.

Thanks again 

On Saturday, December 31, 2016 at 10:05:49 PM UTC-7, Joe wrote:
>
> Hi All
>
> Puppet v3.8.7 community on Ubuntu 14 LTS
>
> I have been attempting to write a class to use the "file_line" type 
> reference from the stdlib library to add multiple lines to a file if these 
> lines are not present. 
> I was attempting to do this with iteration using the each function and 
> tried with static and Hiera arrays. After a few hours of failure I came 
> across the docs for Puppet Enterprise that say this iteration capability 
> was introduced in Puppet 4.
>
> It looks like this, testdefs is an array in Hiera defined in the nodes 
> yaml config
>
>  each($testdefs) |$hline| {
>file_line { 'Append a line to /etc/testfile':
>   ensure => present,
>   line  => "$hline",
>path=> '/etc/testfile',
> }
> }
>
> To be clear I am trying to.. 
> iterate through a Hiera array 
> pass each array member to the file_line type 
> append this member to a file if it does not exist.  
>
> Is there a way to do this with Puppet 3.x or should I just make a static 
> class with multiple file_line types?
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ed595ac4-36f0-46e3-8b9c-dd2e0043168f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Array Iteration for Community Edition of Puppet(3.8)

2017-01-02 Thread Joe
All good guys, thanks. Puppetserver 2.7.2-1 installed and clients working.


On Saturday, December 31, 2016 at 10:05:49 PM UTC-7, Joe wrote:
>
> Hi All
>
> Puppet v3.8.7 community on Ubuntu 14 LTS
>
> I have been attempting to write a class to use the "file_line" type 
> reference from the stdlib library to add multiple lines to a file if these 
> lines are not present. 
> I was attempting to do this with iteration using the each function and 
> tried with static and Hiera arrays. After a few hours of failure I came 
> across the docs for Puppet Enterprise that say this iteration capability 
> was introduced in Puppet 4.
>
> It looks like this, testdefs is an array in Hiera defined in the nodes 
> yaml config
>
>  each($testdefs) |$hline| {
>file_line { 'Append a line to /etc/testfile':
>   ensure => present,
>   line  => "$hline",
>path=> '/etc/testfile',
> }
> }
>
> To be clear I am trying to.. 
> iterate through a Hiera array 
> pass each array member to the file_line type 
> append this member to a file if it does not exist.  
>
> Is there a way to do this with Puppet 3.x or should I just make a static 
> class with multiple file_line types?
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/bf2e2e08-8e90-4b0e-8743-82a1908750a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Problem with test run

2017-01-03 Thread Joe
Rob, is there a way to set 'stringify_facts = false' globally on the puppet 
server or this must be done on all clients? I just hit this with a 
puppetlabs module and setting to false on the agent worked. Obviously I 
would rather set t once on the server.

Thanks

On Sunday, November 6, 2016 at 10:44:09 AM UTC-7, ddough...@gmail.com wrote:
>
> facter tells me this:
>
> os => {"family"=>"RedHat", "name"=>"OracleLinux", 
> "release"=>{"major"=>"6", "full"=>"6.6", "minor"=>"6"}}
>
> but puppet agent --test tells me this:
>
> [root@q061oracl0901 puppet]# puppet agent --test
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Loading facts
> Error: Could not retrieve catalog from remote server: Error 500 on SERVER: 
> {"message":"Server Error: Evaluation Error: Error while evaluating a 
> Resource Statement, Data Provider type mismatch: Got String when a 
> hash-like object was expected to access value using 'name' from key '
> facts.os.name' on node 
> q061oracl0901.dqscust.local","issue_kind":"RUNTIME_ERROR"}
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
> [root@q061oracl0901 puppet]#
>
> Client is v3.8.7
>
> Running Foreman1.13 on the server.  
>
> I can telnet to 8140 from the client to the server.  The agent was running 
> successfully for a while.  I added the grub2 class and removed it.  I also 
> put the client into a host group.  I've now removed it to try to 
> troubleshoot the problem.  Any ideas?
>
> Thanks,
> Dan
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/9e0b5b01-099e-4a16-bb41-41d7b317f3c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Community Roles and Profiles

2017-01-11 Thread Joe
Hello All,

Does Puppet Community support Roles and Profiles? The Puppet Community does 
section does not appear to have documentation on them, just looking for 
confirmation.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/19d64f5f-e343-4d89-a8d9-b7abca0c1e5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet Community Roles and Profiles

2017-01-12 Thread Joe
Thank you guys very much, will read up on this.



On Wednesday, January 11, 2017 at 3:52:52 PM UTC-7, Joe wrote:
>
> Hello All,
>
> Does Puppet Community support Roles and Profiles? The Puppet Community 
> does section does not appear to have documentation on them, just looking 
> for confirmation.
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/45b57caa-4112-4ed6-9755-299380f1c84d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet Community Roles and Profiles

2017-01-14 Thread Joe
Hello again,

So I read up and watched the wonderful presentations suggested here. I am 
certain this is the direction for our environment.

I have a question regarding the functionality of the profiles in regards to 
file resources using the "source" option that replaces a file if it has 
changed.. When looking at the example on the official documentation on how 
to use profiles to set module data it shows this.

# 
/etc/puppetlabs/code/environments/production/site/profile/manifests/jenkins/master.ppclass
 profile::jenkins::master (
  String $jenkins_port = '9091',
  String $java_dist= 'jdk',
  String $java_version = 'latest',) {

  class { 'jenkins':
configure_firewall => true,
install_java   => false,
port   => $jenkins_port,
config_hash=> {
  'HTTP_PORT'=> { 'value' => $jenkins_port },
  'JENKINS_PORT' => { 'value' => $jenkins_port },
},

It is clear that the profile::jenkins::master class is declaring the 
jenkins class and setting the install_java param to false as well as 
setting the configure_firewall to true. 

In my case I have a module let's call it "file_config" where I am declaring 
2 separate file resources where if they change, I will copy them from the 
modules files directory.

Here is an example. Both of these file resources are in the same manifest, 
so init.pp of the file_config class.

 class file_config (
$firstfile  = undef,
$secondfile = undef,
) {
  file { '/etc/siteconf/file1':
ensure   => file,
mode => '0644',
owner=> 'root',
checksum => 'md5',
source   => $firstfile,
  }

  file { '/etc/siteconf/file2':
ensure   => file,
mode => '0644',
owner=> 'root',
checksum => 'md5',
source   => $secondfile,
  }
}
 For both I store the values in Hiera and without profiles this works 
exactly how I need it to. However with profiles while I am trying to 
abstract this and I am having difficulty understanding how to configure the 
profile so that each file resource "source" value should be set. Since the 
values I am trying to set are both named "source" I am stuck.

So for example.
##PROFILE
class profiles::base::config1 {

   

  $source1 = hiera('profiles::base::config1::file1') ## file1 
'/etc/siteconf/file1':   $source2 = hiera('profiles::base::config1::file2') ## 
file2 '/etc/siteconf/file2': 
  ##both files are in 'puppet:///modules/file_config/' as file1 and file2, they 
are set pulled into source1 and source2 above.

   ## And now trying to set the values through the profile for file1 and 
file2...this is where i get lost since the values I am trying to set are 
both named "source"

   class file_config: {
 source => $source1 ## this would be for file1 declared file resource 
in the file_config class/module 
 source => $source2 ## this would be for file2 declared file resource 
in the file_config class/module 
   }

I am trying to set the "source" value on both of these file resources which 
seems impossible..
Is the way to do this to put the file resources in their own classes like 
file_config::file1 and file_config::file2 located in 
modules/file_config/manifests/file1.pp and file2.pp?

I hope this is clear and I am 99.9% sure I am approaching this incorrectly. 

Thanks

On Thursday, January 12, 2017 at 11:23:33 AM UTC-7, Joe wrote:
>
> Thank you guys very much, will read up on this.
>
>
>
> On Wednesday, January 11, 2017 at 3:52:52 PM UTC-7, Joe wrote:
>>
>> Hello All,
>>
>> Does Puppet Community support Roles and Profiles? The Puppet Community 
>> does section does not appear to have documentation on them, just looking 
>> for confirmation.
>>
>> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6605356c-6956-4be2-b354-58c58a95bc7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet Community Roles and Profiles

2017-01-14 Thread Joe
Ahh ok , so i am overthinking this..instead of declaring this class in 
resource like fashion just use the "include class" method ... If so that 
simple concept makes perfect sense.

Thank you very much

On Wednesday, January 11, 2017 at 3:52:52 PM UTC-7, Joe wrote:
>
> Hello All,
>
> Does Puppet Community support Roles and Profiles? The Puppet Community 
> does section does not appear to have documentation on them, just looking 
> for confirmation.
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/2b2d9f38-cec1-4c71-8227-345e772abb83%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Message from application: Permission denied - /etc/puppet/modules (Errno::EACCES)

2015-05-11 Thread joe
 

Hi All,

Brand new to puppet and am trying to get a simpler master server set up to 
test it out. I've been following the install guide 
at http://docs.puppetlabs.com/guides/install_puppet/install_el.html. This 
is on CentOS 7 on AWS. Everything goes fine, through the installation of 
passenger. When I start apache and fire up a browser, I get a generic error 
message in my browser and this shows up in the error_log. Any clues as to 
what the permissions issue is would be great. Originally, everything in 
/etc/puppet/ was owned by root. I changed it to puppet (which is the user 
that owns the config.ru file) and that didn't matter either. I'm at a loss 
a this point, so any help would be great.


[ 2015-05-10 21:09:09.6731 1455/7f09e7bc0700 App/Implementation.cpp:287 ]: 
Could not spawn process for application 
/usr/share/puppet/rack/puppetmasterd: An error occured while starting up 
the preloader.

  Error ID: a313ca62

  Error details saved to: /tmp/passenger-error-Lw6ZvE.html

  Message from application: Permission denied - /etc/puppet/modules 
(Errno::EACCES)

  /usr/share/ruby/vendor_ruby/puppet/util/autoload.rb:136:in `open'

  /usr/share/ruby/vendor_ruby/puppet/util/autoload.rb:136:in `entries'

  /usr/share/ruby/vendor_ruby/puppet/util/autoload.rb:136:in `block in 
module_directories'

  /usr/share/ruby/vendor_ruby/puppet/util/autoload.rb:135:in `collect'

  /usr/share/ruby/vendor_ruby/puppet/util/autoload.rb:135:in 
`module_directories'

  /usr/share/ruby/vendor_ruby/puppet/util/autoload.rb:164:in 
`search_directories'

  /usr/share/ruby/vendor_ruby/puppet/util/autoload.rb:94:in `files_to_load'

  /usr/share/ruby/vendor_ruby/puppet/util/autoload.rb:225:in `files_to_load'

  /usr/share/ruby/vendor_ruby/puppet/application.rb:229:in 
`available_application_names'

  /usr/share/ruby/vendor_ruby/puppet/util/command_line.rb:105:in 
`find_subcommand'

  /usr/share/ruby/vendor_ruby/puppet/util/command_line.rb:92:in `execute'

  config.ru:35:in `block in '

  /usr/local/share/gems/gems/rack-1.6.1/lib/rack/builder.rb:55:in 
`instance_eval'

  /usr/local/share/gems/gems/rack-1.6.1/lib/rack/builder.rb:55:in 
`initialize'

  config.ru:1:in `new'

  config.ru:1:in `'

  
/usr/local/share/gems/gems/passenger-5.0.7/helper-scripts/rack-preloader.rb:107:in
 
`eval'

  
/usr/local/share/gems/gems/passenger-5.0.7/helper-scripts/rack-preloader.rb:107:in
 
`preload_app'

  
/usr/local/share/gems/gems/passenger-5.0.7/helper-scripts/rack-preloader.rb:153:in
 
`'

  
/usr/local/share/gems/gems/passenger-5.0.7/helper-scripts/rack-preloader.rb:29:in
 
`'

  
/usr/local/share/gems/gems/passenger-5.0.7/helper-scripts/rack-preloader.rb:28:in
 
`'



[ 2015-05-10 21:09:09.6767 1455/7f09e209e700 
age/Hel/Req/CheckoutSession.cpp:252 ]: [Client 1-2] Cannot checkout session 
because a spawning error occurred. The identifier of the error is a313ca62. 
Please see earlier logs for details about the error.

Thanks!

Joe

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ac934556-4b75-498e-9c8b-6662c2dc8931%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Facts of other nodes

2012-05-10 Thread Joe Topjian
Hi Ohad,


> if you are interested in using foreman, see
> http://blog.theforeman.org/2012/01/getting-foreman-search-results-into.html
>

I currently do not use foreman, but this is good incentive to look into it.
Thank you very much.

Joe

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



Re: [Puppet Users] Re: Facts of other nodes

2012-05-10 Thread Joe Topjian
Hi John,

You can use other nodes' exported resources, if there are any, but you
> cannot use other nodes' facts.  Multiple nodes can use the same data,
> however, by obtaining them from the same source, be it global
> variables, class variables, or external data (e.g. extdata or hiera).
>

Understood.


> I don't quite follow that.  "References"?  Do you mean that class
> some::app::db relies on a template that interpolates the value of the
> db_host parameter?
>

Yes.


> On the contrary, in your example you will have that problem all the
> time.  It doesn't matter what classes have been applied to other
> nodes.  Only classes applied to the same node are accessible to each
> other.  For your example to work, therefore, classes 'my_mysql_server'
> and 'some::app::db' would need to be applied to the same node, and
> each would see the other in the form they were applied to that node.
> In that case you don't need to rely on information about other nodes,
> so the question is moot.
>

OK, I understand now. Thank you.


> Hard coding it is the quick and dirty way.  It's not necessarily
> wrong, but it will make your manifests more difficult to maintain as
> they grow in number and complexity.
>
> You can instead use an external node classifier to declare your
> classes and their parameters.  That does require you to write or
> obtain an ENC, set it up for your configuration, etc.  Foreman is one
> possibility there, and the Puppet Dashboard provides another.
>
> If you're not already using an ENC, however, then I would recommend
> putting the DB server name into an external data store and reading it
> into your manifest via a Puppet function.  The built-in extlookup()
> function provides an approach of this sort.  Hiera provides a more
> flexible approach of the same kind, and it will be a built-in starting
> with the next major version of Puppet (Telly).
>

Thank you for the options - it's appreciated.

Joe


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



Re: [Puppet Users] Facts of other nodes

2012-05-10 Thread Joe Topjian
Hi Dan,

You may want to have a look at this function:
>
> https://github.com/puppetlabs/puppetlabs-nodesearch
>
> it doest map exactly to your use case, but the implementation of it is
> close to what the implementation for your solution may look like.
>

This definitely looks useful. Thank you!


> Its worth noting that once the next generation of storeconfigs comes out
> (which is REALLY soon), it will have better APIs to support these kinds of
> functions and  I intend to write puppet functions that support these kinds
> of use cases.
>

Good to know - thanks!

Joe


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



Re: [Puppet Users] Why we wont use zpool ever again

2010-04-06 Thread Joe McDonagh

Peter Meier wrote:

Hi

But we won't use the zpool type ever again. Its just not worth it. 
Here's what happened:


. one of our servers lost knowledge about one of its zfs pools
. puppet didn't find the pool and .. went on to zpool create it
. we did indeed have a backup, but would have lost all data if not

Creating zpools is a manual thing in every case, since one has to 
know the devices participating. The names of which tend to be a 
little bit different from one server to the next.


Add that to the possibility of major data loss (like we just 
experienced) and get a negative yield for the 'zpool' type.


there was recently a similar discussion about that with the new 
available fs and lvm type on the puppet-dev list. these are indeed 
very dangerous operations, where it should somehow be possible to lock 
them. the problem is clearly that if puppet fails to determine the 
correct state it tries to transfer into the right state, which might 
have (obviously) - ehhh - "nasty side-effects" on such operations.


maybe you can catch that discussion up and give your thoughts about it 
how puppet should behave and how it would be possible to "lock" such 
operations.


cheers pete

I see this as being distinctly part of the provisioning portion of a 
server life-cycle. I haven't looked at the discussion on -dev, but i'm 
not sure these types really belong in core puppet. They're not 
unix-agnostic resources for one (has that fundamental bit of philosophy 
changed?), and they're unlikely to change in a way that you want puppet 
to 'correct'.


That being said, some people have 'bootstrap' envs, which would be a 
better place to have these destructive resources than in your production 
environment.


--
Joe McDonagh
AIM: YoosingYoonickz
IRC: joe-mac on freenode
L'ennui est contre-révolutionnaire

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



Re: [Puppet Users] Why we wont use zpool ever again

2010-04-06 Thread Joe McDonagh

Kaspar Schiess wrote:

Hi everyone,

Just wanted to tell you a little story. We've been enthusiastic puppet 
users since about a year ago here at the Geographic Institute of the 
University of Zürich.


But we won't use the zpool type ever again. Its just not worth it. 
Here's what happened:


. one of our servers lost knowledge about one of its zfs pools
. puppet didn't find the pool and .. went on to zpool create it
. we did indeed have a backup, but would have lost all data if not

Creating zpools is a manual thing in every case, since one has to know 
the devices participating. The names of which tend to be a little bit 
different from one server to the next.


Add that to the possibility of major data loss (like we just 
experienced) and get a negative yield for the 'zpool' type.


Hoping to inspire a few..
kaspar


Thunderbird and/or GMail just flaked so apologies if this is sent twice:

I see this as being distinctly part of the provisioning portion of a 
server life-cycle. I haven't looked at the discussion on -dev, but i'm 
not sure these types really belong in core puppet. They're not 
unix-agnostic resources for one (has that fundamental bit of philosophy 
changed?), and they're unlikely to change in a way that you want puppet 
to 'correct'.


That being said, some people have 'bootstrap' envs, which would be a 
better place to have these destructive resources than in your production 
environment.


--
Joe McDonagh
AIM: YoosingYoonickz
IRC: joe-mac on freenode
L'ennui est contre-révolutionnaire

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



  1   2   3   4   >