Re: [Puppet Users] Re: Dealing with multiple gid changes

2012-06-08 Thread vagn scott
On 06/08/2012 09:06 AM, jcbollinger wrote: On Jun 7, 8:29 am, Jistan Idiotjistanid...@gmail.com wrote: So I discovered yesterday that if puppet changes the gid of a group it doesn't go through the file system and update them with the new correct gid (at least this was the case on RHEL5

Re: [Puppet Users] Different versions for server and agents

2012-03-12 Thread vagn scott
On 03/12/2012 10:16 AM, Peter Bukowinski wrote: Your master's version should always be equal to or greater than the latest client version you're using. You can count on a newer master working with older clients, but don't count on newer clients working with older masters. So, no problems

Re: [Puppet Users] Puppet Master server migration and problem? 2.6 to 2.7

2012-03-12 Thread vagn scott
On 03/12/2012 08:22 PM, MF wrote: Hello, I am setting up a new master server and migrating my configuration from my current master server. I am also upgrading from 2.6 to 2.7. I have the new server built and integrated with Apache, Passenger, and Dashboard just like on my current server. I

Re: [Puppet Users] Puppet symlink

2012-01-01 Thread vagn scott
Can you make your symlinks look like this? libsomething.so --- libsomething.so.0 libsomething.so.0 --- libsomething.so.0.vv.rr the base links can change all they want, in that case. --vagn On 12/30/2011 11:32 AM, Len Rugen wrote: We have a case where we've been requested to create an extra

Re: [Puppet Users] hasstatus not working as expected

2011-08-12 Thread vagn scott
On 08/12/2011 09:32 AM, Chad wrote: Any ideas? For starters, see what happens when you run it in an exec { build_iptables status: logoutput = true, } -- vagn -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send

Re: [Puppet Users] Distributing a PHP file as template fails

2011-08-11 Thread vagn scott
On 08/11/2011 04:42 AM, Tom De Vylder wrote: # cat include/init.php ?php $dbhost = '%= app_dbhost %'; $dbname = '%= app_dbname %'; $dbuser = '%= app_dbuser %'; $dbpass = '%= app_dbpass %'; ? Surely you mean (note the dash (-) ): ?php $dbhost = '%= app_dbhost -%';

Re: [Puppet Users] Re: Why?

2011-08-10 Thread vagn scott
On 08/10/2011 02:40 AM, ki_chi_saga wrote: exec { 'a': ... } - exec { 'b': ... } - exec { 'c': ... } can I really be sure that puppet evaluates this in the sequence of writing? See the little arrows? - That is one way to declare sequence. There are others. See the

Re: [Puppet Users] class locating problem

2011-08-09 Thread vagn scott
On 08/08/2011 05:55 PM, David Kavanagh wrote: eucalyptus/modules/ntp/manifests/init.pp (defines class eucalyptus::ntp) try putting whatever/eucalyptus/modules on your module path. -- vagn -- You received this message because you are subscribed to the Google Groups Puppet Users

Re: [Puppet Users] Why?

2011-08-09 Thread vagn scott
On 08/09/2011 01:19 PM, ki_chi_saga wrote: To me the Exec[shareall] will be run last? But does it? Rgds, Mat if you care about order you should make it explicit: exec { 'a': ... } - exec { 'b': ... } - exec { 'c': ... } or exec { 'a': before = Exec[ 'b' ], ... }

Re: [Puppet Users] Re: Handling ENC / Class interface changes

2011-08-09 Thread vagn scott
Whenever we want to add additional parameters to certain classes, unless we update that class and the YAML that drives it atomically everywhere, we end up in a situation where the YAML does not match the parameterised class and causes errors. Warning: brainstorm ahead. As long as you can

Re: [Puppet Users] Hash Interpolation inside double quotes?

2011-08-08 Thread vagn scott
On 08/08/2011 02:52 PM, Douglas Garstang wrote: file { '/opt/sugarsync/tomcat/tomcat-home/current': ensure = inline_template(tomcat-%= $config['tomcat_version_server'] %); } Try without the dollar sign: file {

Re: [Puppet Users] Hash Interpolation inside double quotes?

2011-08-08 Thread vagn scott
On 08/08/2011 04:26 PM, Douglas Garstang wrote: But, I would like to replace: file { ${tomcat_home_dir}/current: ensure = inline_template(tomcat-%= config['tomcat_version_server'] %); } with: file { $config['tomcat_home_dir']/current:

Re: [Puppet Users] Re: Variable scope when having node inheritance

2011-08-05 Thread vagn scott
On 08/05/2011 04:25 AM, Thomas Rasmussen wrote: Is there any way of overriding a previously include of a class? Yes. See http://docs.puppetlabs.com/guides/troubleshooting.html#class-inheritance-and-variable-scope Something like (warning: untested): Class[Sudoers::Config] { env =

Re: [Puppet Users] Does Node Inheritance work for people?

2011-08-05 Thread vagn scott
On 08/05/2011 10:21 AM, R.I.Pienaar wrote: But also now I think $foo should be considered a top level variable in 2.7 when its not, making node variables more or less useless. I like it that node variables are local and private. node default { $foo = $backupdir/${hostname}

Re: [Puppet Users] Re: Does Node Inheritance work for people?

2011-08-05 Thread vagn scott
On 08/05/2011 01:18 PM, jcbollinger wrote: On Aug 5, 9:38 am, vagn scottvagnsc...@gmail.com wrote: I think one could make a case for getting rid of global variables entirely. Sort of. There are alternatives that could fill the same role, such as class variables of a class that

Re: [Puppet Users] Re: Special character in facter variable

2011-08-04 Thread vagn scott
What version of puppet are you on? On 08/04/2011 03:30 AM, Jean-Christophe Lacaze / Bintz wrote: It's a fact generated automatically when something is mounted and replace / with _ to generate the fact variable. In my exemple, I have a mountpoint on /var/lib/xxx-yyy/zzz that points to /dev/drbd0

Re: [Puppet Users] Re: Special character in facter variable

2011-08-04 Thread vagn scott
On 08/04/2011 06:18 AM, Jean-Christophe Lacaze / Bintz wrote: Im on a 2.6.1 from http://projects.puppetlabs.com/projects/puppet/wiki/Allowed_Characters_in_Identifier_Names Variables: ΒΆ

Re: [Puppet Users] Re: Special character in facter variable

2011-08-04 Thread vagn scott
On 08/04/2011 09:14 AM, Jean-Christophe Lacaze / Bintz wrote: Isn't there a way to protect the hyphen Not that I know of. Have you considered getting rid of the hyphen? Why does your mount have to be xxx-yyy? can't it be xxx_yyy? Anyway, I'm out of ideas on this. Good luck. -- vagn --

Re: [Puppet Users] Special character in facter variable

2011-08-03 Thread vagn scott
On 08/03/2011 05:49 AM, Jean-Christophe Lacaze / Bintz wrote: $mountpoint_path_my-path being the facter variable ${mountpoint_path_my-path} should work on 2.7.2rc2. Earlier versions of puppet don't let you have '-' in a variable name. Not sure if you are allowed to have a '-' in the fact

Re: [Puppet Users] Re: pluginsync before catalogue?

2011-08-03 Thread vagn scott
On 08/03/2011 12:50 PM, Craig White wrote: an erb template for the clients' puppet.conf which has environment =%= environment % the environment is set on the client, so you've implemented a no-op. -- vagn -- You received this message because you are subscribed to the Google Groups Puppet

[Puppet Users] prep for 2.8: default values and overrides

2011-08-02 Thread vagn scott
prep for 2.8: default values and overrides I was very happy, some months ago, when I worked out how to separate configuration from code in puppet. The scheme even allowed for specialization. The style was something like this: cat 04_default.pp #! /usr/bin/puppet apply node default {

Re: [Puppet Users] Step by step guide to setting user passwords

2011-08-02 Thread vagn scott
On 08/02/2011 03:52 PM, Jfro wrote: Can someone walk me through the steps of sending out a password to all my computers for user student. I do this a lot: yes 'PASSWORD' | passwd username Then you can extract the password from /etc/shadow also see here:

[Puppet Users] prep for 2.8: scopes and variables: nodes are not classes

2011-08-01 Thread vagn scott
prep for 2.8: scopes and variables: nodes are not classes I have been preparing for 2.8 by experimenting with 2.7.X and seeing what it takes to get rid of the warnings. I would like to share my results in a number of upcoming posts. Begin with the simple question of hard-wiring scopes. the

Re: [Puppet Users] Temporary requirements

2011-08-01 Thread vagn scott
On 08/01/2011 06:40 AM, David wrote: The scenario is, every server in our estate of Debian machines requires some monitoring software which is not provided as a Debian package. You should make your own debian package(s) for the monitoring software instead of installing from source on every

Re: [Puppet Users] Managing sudo via puppet using #includedir

2011-08-01 Thread vagn scott
On 08/01/2011 01:41 PM, treydock wrote: #includedir /etc/sudoers.d Maybe without the quotation marks? -- vagn -- 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

Re: [Puppet Users] Multi site best practices

2011-08-01 Thread vagn scott
On 08/01/2011 05:04 PM, Jared Curtis wrote: * Central Dashboard instance * Central CA Would it be a problem if your central CA and dashboard became unavailable? -v -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this

Re: [Puppet Users] add ip address of another EC2 instance automatically in the hosts file of existing EC2 instance

2011-07-29 Thread vagn scott
On 07/29/2011 08:57 PM, newguy wrote: I want to add the ip address of client B in a module M of client A. Lets assume that I don't know their ip addresses before hand. Well, what do you know before hand? Do you know the name of client B? Why can't you use that, directly? If you know

Re: [Puppet Users] Upgrading 0.25.5 to 2.7.1

2011-07-27 Thread vagn scott
Funny you should mention that. I have been playing around with separating the puppetmaster config from the agent config. See here: http://agawamtech.com/blog/?p=383 You could probably do something similar, and it would allow you to switch the agent from one master to another. -- vagn

[Puppet Users] 2.7.2rc changed the way variable names are parsed

2011-07-26 Thread vagn scott
In 2.7.2rc2 the '-' is now parsed as part of the variable name. Is this a deliberate change? #! /usr/bin/puppet apply $hello = hello $world = world $hello- = SURPRISE notice($hello-$world) notice(${hello}-$world) # result: # # ./surprise1.pp # notice: Scope(Class[main]):

Re: [Puppet Users] 2.7.2rc changed the way variable names are parsed

2011-07-26 Thread vagn scott
On 07/26/2011 10:32 AM, Nigel Kersten wrote: Allowing a trailing hyphen doesn't seem like the most optimal solution though That doesn't matter so much. But, expanding the character set for variables without even mentioning it in the release notes has caused me some pain. You really

Re: [Puppet Users] 2.7.2rc changed the way variable names are parsed

2011-07-26 Thread vagn scott
On 07/26/2011 10:54 AM, Nigel Kersten wrote: I guess it's just a case of being a defensive shell programmer, but I've always considered curlies-with-double-quotes to be essential with all interpolated strings. A better way to handle it would be to make curlies mandatory, and then change

Re: [Puppet Users] Re: 'requires' dependency in file-fragments pattern was not honored

2011-07-25 Thread vagn scott
On 07/25/2011 08:47 AM, jcbollinger wrote: Puppet should not, and typically doesn't, apply resources that require a failed resource. The content of the file managed by File[Make_Sudo_File_Live] is not directly relevant. I wonder what would happen if he spelled his dependency chain like

Re: [Puppet Users] Re: exec onlyif not working properly

2011-07-24 Thread vagn scott
On 07/24/2011 01:40 AM, John Martin wrote: You must add a second grep to ignore it. the idiom is to use a trivial character class: unless = /bin/ps -aux | /usr/bin/grep '/[d]ata/service', -- You received this message because you are subscribed to the Google Groups Puppet Users group.

Re: [Puppet Users] Node or site.pp for global variables without dynamic lookup

2011-07-23 Thread vagn scott
Node scope is not global scope. But, more interesting: On 07/23/2011 04:18 PM, rvlinden wrote: I really love the way I can inherit from nodes and define new or overrule existing variables. I have been experimenting with puppet 2.7.1. It turns out that parameterized classes can inherit

Re: [Puppet Users] Semi-architectural question - data inside code-tree.

2011-07-22 Thread vagn scott
On 07/21/2011 10:57 AM, John Hawkes-Reed wrote: It seems to me that mixing code and data like that might be a bad idea, and was wondering if anyone else had a better one. It would be cool if puppet knew about svn, git, and so on. A file could have a URI and revision, when the revision

Re: [Puppet Users] Re: 'requires' dependency in file-fragments pattern was not honored

2011-07-22 Thread vagn scott
On 07/22/2011 09:08 AM, jcbollinger wrote: Well yes, but that's not relevant to the OP's problem. I had in fact supposed that he omitted all that so as to provide a smaller failure case. The OP's problem is that he is not including the header fragment in Assemble_Sudo_Fragments. It is easy

Re: [Puppet Users] Purge puppet's reports

2011-07-21 Thread vagn scott
On 07/21/2011 03:14 AM, Hugo Deprez wrote: Is there any mechanism available to auto delete old files ? Or should I configured my own script to clean up old reports ? I'm doing this: class puppet::clean_reports { cron { puppet clean reports: command = 'cd

Re: [Puppet Users] Purge puppet's reports

2011-07-21 Thread vagn scott
On 07/21/2011 08:08 AM, vagn scott wrote: On 07/21/2011 03:14 AM, Hugo Deprez wrote: Is there any mechanism available to auto delete old files ? Or should I configured my own script to clean up old reports ? I'm doing this: class puppet::clean_reports { cron { puppet clean reports

Re: [Puppet Users] Purge puppet's reports

2011-07-21 Thread vagn scott
On 07/21/2011 08:52 AM, vagn scott wrote: Thinking about this some more, if you need the reports for dashboard to work, then any cleanup script should leave the latest report from any server, so that, even if the server has not checked in for a while it won't disappear. Thanks

Re: [Puppet Users] 'requires' dependency in file-fragments pattern was not honored

2011-07-21 Thread vagn scott
On 07/20/2011 09:37 PM, Jon Jaroker wrote: Hello, I was wondering if anyone can spot the mistake I am making in the file-fragments pattern below. You probably want to drop ALL your fragments into the fragments directory, including the head fragment. Use naming conventions to establish

Re: [Puppet Users] Definition parameter defaulting to the definition's own $title?

2011-07-20 Thread vagn scott
On 07/20/2011 04:43 AM, Matthias Saou wrote: * The definition is in a generic module for which it does not make sense to default the parameter to this calculated value. Instead of passing in the port number you could pass a template for its creation node 'myvmhost' { createvm { [

Re: [Puppet Users] Definition parameter defaulting to the definition's own $title?

2011-07-20 Thread vagn scott
On 07/20/2011 04:43 AM, Matthias Saou wrote: node 'myvmhost' { createvm { [ 'vm01', 'vm02', 'vm03', 'vm04', 'vm05' ]: # VNC Port 59XY for vmXY vncport = regsubst($name, 'vm', '59'), } } that looks like an interesting module. are you planning to publish it? Or, could I get

Re: [Puppet Users] Re: Ruby script to download files without 'puppet agent'

2011-07-19 Thread vagn scott
On 07/18/2011 06:45 PM, Nick Fagerlund wrote: You're not the only one -- I've never gotten a puppet apply shebang line to work. I investigated around the office, and I think what I found was that everyone remembered it having worked at some point in the unspecified past, but no one could specify

Re: [Puppet Users] Variables in nodes classes and defines (headache)

2011-07-19 Thread vagn scott
On 07/19/2011 09:50 AM, rvlinden wrote: Can somebody explain me what I am doing wrong here ? or what I have missed ? WHy does the apache params 'see' the variable frmo the node config and the users params not ? bad news: your apache class relies on dynamically scoped variables. When dyn.

Re: [Puppet Users] Ruby script to download files without 'puppet agent'

2011-07-18 Thread vagn scott
On 07/18/2011 11:27 AM, zu...@puzzle.ch wrote: I saw that some use the shebang #!/usr/bin/puppet apply to start such manifests directly as a script. This does not seam to work for me. All i get is: If your script name is foo, and you have #!/usr/bin/puppet apply as the first line, then you

Re: [Puppet Users] Installing from source, not a package

2011-07-17 Thread vagn scott
On 07/17/2011 12:45 PM, S Ahmed wrote: So I ran through a server setup on ec2, and have a text file of all the commands I used to get the server to where I wanted it. step 1: turn your list of commands into an idempotent script #! /bin/sh

Re: [Puppet Users] Installing from source, not a package

2011-07-17 Thread vagn scott
On 07/17/2011 03:05 PM, S Ahmed wrote: The last bit of what you said I don't understand: But, the biggest improvement would be to make your own package and install that instead of fiddling around with this low level stuff in the manifests. My apologies. I should remember to use standard

Re: [Puppet Users] Installing from source, not a package

2011-07-17 Thread vagn scott
Is suppose I should mention that, if you have an idempotent script like the one mentioned, you can use it directly. Again, not tested, so may bugs. class ruby_from_src { file { /root/ruby_from_src.sh: content = template(ruby_from_src/ruby_from_src.sh),

Re: [Puppet Users] Re: how to write classes to install package from source

2011-07-13 Thread vagn scott
On 07/12/2011 06:19 AM, Al @ Lab42 wrote: command = mkdir -p $destination_dir ; cd $destination_dir ; $extract_command $work_dir/$source_filename, Nice. But I would suggest changing ';' to ''. That way, if the mkdir or cd fail you don't end up trying to extract the archive in

Re: [Puppet Users] Re: Checking for free disk space on mountpoint?

2011-07-12 Thread vagn scott
On 07/12/2011 01:05 AM, Patrick wrote: Keep in mind that, this being unix, there's no drives so if you will probably be checking the amount of space on root if you don't think about it. There most certainly are drives in unix. Not drive letters, though. The drives are normally denoted

Re: [Puppet Users] Re: Checking for free disk space on mountpoint?

2011-07-11 Thread vagn scott
On 07/11/2011 10:37 PM, Victor Hooi wrote: As long as we have more the x bytes available when we install things, we know we'll be fine. Here is a proof of concept. With a little tweaking you should be able to test for an absolute amount of free space on any mounted volume. Hope that helps,

Re: [Puppet Users] Recursive directory management

2011-07-08 Thread vagn scott
On 07/07/2011 12:43 PM, romuald FREBAULT wrote: has anyone an idea of how i could have managed files removed on destnation when removed from source without using the entierely purge function? What you want is a /etc/cron.puppet.d and a way to link files there into /etc/cron.d (cron supports

Re: [Puppet Users] Passing variables between stages

2011-07-08 Thread vagn scott
On 07/08/2011 04:10 PM, Chip Schweiss wrote: How to access a variable set in the node declaration from a class that executes in the post stage? The answer is the same whether you use stages or not. Put your variables in a class.Below was tested on puppet 2.7.1. Per node stuff (eg

[Puppet Users] catalog run time? what about facter run time?

2011-07-07 Thread vagn scott
The catalog run time that is reported: does that include the facter run time? If not, how should I get that? What kind of performance statistics does puppet/facter keep, if any, and how do I access them? Is there a FM I should R? -- Thanks, vagn -- You received this message because you

Re: [Puppet Users] Passing variables between stages

2011-07-07 Thread vagn scott
That sounds suspiciously like procedural thinking about a declarative language. You should understand that in puppet everything is 'set' before anything is 'done'. Stages just help to order the 'get it done' part. So the answer to your question about a method to access a variable is:

Re: [Puppet Users] proposed syntax: order { }

2011-07-05 Thread vagn scott
On 07/05/2011 01:57 AM, Peter Meier wrote: Can also be: Yes, I know. Now expand this one, and maybe you will get my point. - Thinking about this some more, I like block better, with order optional: class c { block { x:# any order package {

Re: [Puppet Users] proposed syntax: order { }

2011-07-05 Thread vagn scott
On 07/05/2011 04:35 AM, Ken Barber wrote: Whats wrong with using chained resources? It doesn't scale. Try expanding this (it is a slightly improved proposal with block{} instead of order{}): class c { block { x:# any order package { ... } file

Re: [Puppet Users] Re: proposed syntax: order { }

2011-07-05 Thread vagn scott
On 07/05/2011 05:35 AM, Luke Bigum wrote: avoiding the use of a class for ... conceptual reasons. Exactly right. Thank you for that phrase. -v -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to

Re: [Puppet Users] proposed syntax: order { }

2011-07-05 Thread vagn scott
On 07/05/2011 05:51 AM, Ken Barber wrote: Then you can also use these anonymous blocks/closures with defaults as well: class c { { Service { hasstatus = true } service { a: } }- Yes, they should have their own scope, and pretty normal puppet semantics/conventions. Maybe

Re: [Puppet Users] puppet terminating - continually forcing itself to stop

2011-07-05 Thread vagn scott
On 07/05/2011 07:15 AM, Chris Phillips wrote: debug: Service[puppet](provider=redhat): Executing '/sbin/service puppet stop' notice: Caught TERM; calling stop [root@gibsvlin-erp2dst ~]# /etc/init.d/puppet status puppetd is stopped That's just weird looking. So puppet is running, and

Re: [Puppet Users] puppet terminating - continually forcing itself to stop

2011-07-05 Thread vagn scott
On 07/05/2011 09:24 AM, Martin Alfke wrote: On 07/05/2011 03:19 PM, Brian Gallew wrote: I was seeing the behavior on my Solaris boxes when running Puppet under SMF. The issue, in my case, was that I was trying to work around an SMF bug. My workaround was to svcadm disable

Re: [Puppet Users] Re: err: Could not retrieve catalog from remote server: Could not intern from pson: Could not convert from pson: Could not find relationship target File[]

2011-07-04 Thread vagn scott
On 07/04/2011 02:49 PM, Michael Halligan wrote: Forgive my cluelessness, but why is it so difficult for Puppet to at least tell me what file this came from OK, I'll take a crack at an answer. --- typical compiler versus parser problem. If the parser saw this, it could stop

[Puppet Users] proposed syntax: order { }

2011-07-04 Thread vagn scott
Sometimes things just have to happen in sequence. It is the simplest of relations, but puppet really has no convenient, non-fiddly way to express it. So, how about class x { order { z: file { a: ... } exec {

Re: [Puppet Users] proposed syntax: order { }

2011-07-04 Thread vagn scott
On 07/04/2011 11:42 PM, Scott Smith wrote: I take it you're not familiar with the `requires' parameter. I'm familiar with requires subscribe notifies - - before which are great for specifying relations between non-adjacent things. But they are annoying to use for

Re: [Puppet Users] proposed syntax: order { }

2011-07-04 Thread vagn scott
On 07/04/2011 11:51 PM, Scott Smith wrote: Ignoring the fact that noise is very subjective... it doesn't. In Puppet, position in a file has no bearing on order. It's not an imperative language. I understand. What I am saying is that another way to express this file { a:

Re: [Puppet Users] proposed syntax: order { }

2011-07-04 Thread vagn scott
On 07/04/2011 11:56 PM, vagn scott wrote: On 07/04/2011 11:51 PM, Scott Smith wrote: Ignoring the fact that noise is very subjective... it doesn't. In Puppet, position in a file has no bearing on order. It's not an imperative language. Oops, that should be: file

Re: [Puppet Users] Re: puppet master and puppet client running very slow

2011-07-04 Thread vagn scott
Is the client healthy? File system not full? No errors in log files, like a disk might be failing? Load average reasonable? Any network changes? Do you have a switch plugged into itself? what does tcpdump show? Normal activity? -- vagn On 07/05/2011 12:11 AM, sanjiv.singh wrote: some times

Re: [Puppet Users] Re: err: Could not retrieve catalog from remote server: Could not intern from pson: Could not convert from pson: Could not find relationship target File[]

2011-07-04 Thread vagn scott
of a resource? On Mon, Jul 4, 2011 at 8:03 PM, vagn scott vagnsc...@gmail.com mailto:vagnsc...@gmail.com wrote: $foo = inline_template( ... ) $baz = inline_template( ... ) File[ $foo$baz ] -- You received this message because you are subscribed

Re: [Puppet Users] proposed syntax: order { }

2011-07-04 Thread vagn scott
Thinking about this some more, I like block better, with order optional: class c { block { x:# any order package { ... } file { aaa: } exec { bbb: } file { ccc: } include foo } block { y:

Re: [Puppet Users] proposed syntax: order { }

2011-07-04 Thread vagn scott
On 07/05/2011 01:08 AM, Scott Smith wrote: Whatever problem you are trying to solve is most likely best handled outside of Puppet. The problem I'm trying to solve is one of expressiveness in the language. I'm not adding any functionality that is not already in puppet. I'm just suggesting

Re: [Puppet Users] Re: Different users within same exec

2011-07-02 Thread vagn scott
On 06/26/2011 02:01 PM, ssk1287 wrote: Consider the following scenario. a folder FOLDER 1 which is owned by the root as it should be accessible to all users of the system. That's your mistake, right there. If you want a folder accessible to all users then make it group writable for some

Re: [Puppet Users] Re: err: Could not retrieve catalog from remote server: Could not intern from pson: Could not convert from pson: Could not find relationship target File[]

2011-07-02 Thread vagn scott
On 07/02/2011 03:20 PM, Eric Sorenson wrote: This is usually because somewhere you have a File resource whose name is a variable, and the variable's undefined. And a common reason for that to happen is that you've mistyped the variable name. Your design could be just fine. This is a good

Re: [Puppet Users] Re: How to define a hash table and loop over them in a definition?

2011-07-01 Thread vagn scott
Maybe you've got network issues? 1 minute sounds like two DNS lookups timing out. -- vagn On 06/30/2011 01:42 PM, Haitao Jiang wrote: Thanks a lot for both answers! Very helpful. However, I was a little surprised that how slow Puppet was when I run your example. Was it Puppet just slow or was

Re: [Puppet Users] functions and environments

2011-07-01 Thread vagn scott
On 06/17/2011 10:52 AM, Nigel Kersten wrote: It's not entirely unreasonable to expect that if module 'foo' is found in one modulepath component, that no other module named 'foo' should come into play, but I think we have some edge cases here. Please feel free to file a feature request around

Re: [Puppet Users] Re: Puppet 2.7.1, variable scoping, best practices

2011-07-01 Thread vagn scott
On 07/01/2011 10:01 AM, jcbollinger wrote: Parameterized classes address problem (1) by formalizing class parameterization, and they address problem (2) by making it illegal to include a parameterized class more than once (even with the same parameters). One of my main objections to

Re: [Puppet Users] Override resource in nested class structure

2011-07-01 Thread vagn scott
Here's one way. It's ugly, but it works. -- vagn #! /usr/bin/puppet apply # Hello everybody # # I have a set of nested classes and the deepest class looks after a # file resource. I want all my nodes to be of the parent class type # except one of them needs a special copy of the same file

Re: [Puppet Users] sysv init scripts when using gem to install

2011-07-01 Thread vagn scott
does /var/run/puppet exist? -v On 06/21/2011 12:30 PM, Craig White wrote: I am using ruby-enterprise for ruby packages and gem for puppet/facter installation and I 'borrowed' the ubuntu sysv init scripts and they mostly work but for some reason, it won't stop the service as written but it

Re: [Puppet Users] Puppet 2.7.1, variable scoping, best practices

2011-06-30 Thread vagn scott
I'm doing something similar with class inheritance, rather than node inheritance. In http://docs.puppetlabs.com/guides/scope_and_puppet.html it says: In effect, all variables will be either strictly local or strictly global. The one exception will be derived classes, which

Re: [Puppet Users] require = Class

2011-06-30 Thread vagn scott
you also have to have a include foo1 somewhere. Note that your require is a dependency, not an instantiation. require just says that foo1 has to be installed first, before libreoffice package can be installed. -- vagn class libreoffice { case $hostname { foo: {

Re: [Puppet Users] Re: How to define a hash table and loop over them in a definition?

2011-06-29 Thread vagn scott
On 06/29/2011 09:56 PM, treydock wrote: % apparray.each do |key,value| -% Key:%= key % Path:%= value['path'] % Command:%= value['command'] % % end -% inline_template() can be used as a here document. that plus a puppet shebang line makes testing and presenting examples really easy. Put the

[Puppet Users] making puppetd immortal

2011-06-29 Thread vagn scott
In my reading I just ran across this: [Puppet - Bug #7273] Modifying puppet.conf causes 'reparsing config' and TERM signal results in shutdown of daemon short version: puppet agent can commit suicide, but it can't raise itself from the dead. However, init is immortal, and

Re: [Puppet Users] installing puppet client

2011-06-21 Thread vagn scott
Have you looked at clusterssh? -- vagn On 06/21/2011 12:01 PM, Andreas Kuntzagk wrote: CHEBRIAN wrote: Hi, how to install puppet client thru puppet master . My requirement is to install puppet client nearly 400 client servers. its difficult to install puppet client in all the servers by

Re: [Puppet Users] Problem in wordpress moodule.

2011-06-18 Thread vagn scott
On 06/18/2011 10:31 AM, Markus Falb wrote: On 18.6.2011 05:30, vagn scott wrote: or you can do what I do and pipe that archive into tar: exec { true $title wget -O - $upstream | tar xzf - --xform 's,wordpress/,,': cwd = $top, creates

Re: [Puppet Users] Problem in wordpress moodule.

2011-06-17 Thread vagn scott
On 06/17/2011 09:14 AM, lucas.brig...@ymail.com wrote: Hi! I'm doing a module for the puppet for WordPress will implement. I'm having problems with this line: exec { tar -vzxf ${downdir}wordpress.tar.gz: path = [/usr/local/bin,/opt/local/bin,/usr/bin,/usr/sbin],

Re: [Puppet Users] RFC: Adding implicit stages to Puppet

2011-06-11 Thread Vagn Scott
Let's see: Then I could do Stage { ensure = enforcement, } at the top and get the behavior I want: prerequisites are satisfied before moving on. But, what's the use case for relationship? Why would I want that? consider three stages in various combinations of enforcement (e) and relationship

Re: [Puppet Users] RFC: Adding implicit stages to Puppet

2011-06-11 Thread Vagn Scott
On 06/11/2011 01:06 PM, Nan Liu wrote: I'm not sure if I captured the intention well, essentially still want a way to coarsely organize classes, however without adding any dependency requirement. So deploy user accounts/customization after application deployment, however still proceed with

Re: [Puppet Users] RFC: Adding implicit stages to Puppet

2011-06-10 Thread Vagn Scott
Puppet already has stage[ Main ] which is the only stage it needs to define. All other stages can be defined relative to main and each other, and should be a matter of convention. So I think it would be more fruitful to talk about the purpose of stages, along with their proposed names. For

Re: [Puppet Users] Re: RFC: Adding implicit stages to Puppet

2011-06-10 Thread vagn scott
On 06/10/2011 08:55 AM, jcbollinger wrote: Maybe what is needed is an easier way to perform two or more successive puppet runs in different environments. It would be nice to have a puppet restart command. Tell puppet that it should reinitialize and try again. Then you could, as you say,

Re: [Puppet Users] RFC: Adding implicit stages to Puppet

2011-06-09 Thread vagn scott
A while back I wrote down all the puppet patterns I could think of, and this was one of them. I named it Cradle To Grave, but probably that's not appropriate. However, I was only focusing on puppet runs at the time, so that name popped into my head. It is an instance of the more general pattern

Re: [Puppet Users] Dealing with samhain

2011-06-08 Thread vagn scott
|Does this help? dpkg -L PACKAGENAME | On 06/08/2011 01:44 AM, Robin Lee Powell wrote: (zombie thread rar!) Where this comes up for me is when I have packages set to latest. There's not really any way, I don't think, to integrate samhain into this process (that is, to say I just

Re: [Puppet Users] PC EU feedback: unpack array variables in string interpolation

2011-05-24 Thread vagn scott
What should this do? $array = [ one, two ] $greeting = [ hello, howdy ] @file { host_$array$greeting } or this? $array = [ one, two ] @file { $array_blah } seems like we would need delimiters host_${array}_${greeting} and some form of expansion control. Should it

Re: [Puppet Users] ubuntu package installs

2011-05-13 Thread vagn scott
It would be convenient if you could download from a debian repository that has the packages you want. The logical place to find that is somewhere under the control of the Amanda people, but they don't seem to have that set up. The debian backports site doesn't have the version you are

Re: [Puppet Users] Re: ERB advice

2011-05-06 Thread vagn scott
On 04/15/2011 03:05 PM, Rob McBroom wrote: On Apr 15, 2011, at 2:58 PM, Ramin K wrote: I use the IP address to generate a 32bit integer for the server_id for my Mysql configs. server_id =%= ipaddress.split('.').inject(0) {|total,value| (total 8 ) + value.to_i} % Would something like

Re: [Puppet Users] Can puppet client make immediate pull after a file's content change by user?

2011-05-04 Thread vagn scott
It sounds like you are solving the wrong problem. Why do your users have root privs? If they need root for some things, use sudo to give them only what they need. Or use suid/sgid mechanisms to allow community access to certain resources. If you need to lock down specific files look at the

Re: [Puppet Users] Re: run stages and mixed class styles

2011-05-02 Thread vagn scott
I took another pass at this and it seems to work the way I expected it to. I'm not sure why it didn't work before, and I don't have time right now to look into it. Anyway, thanks to those who replied. If I find anything interesting I will post it. -- thanks, vagn On 04/29/2011 10:53 AM,

Re: [Puppet Users] How to check if a package exists

2011-04-30 Thread vagn scott
Please look at ldconfig -N it will update the links for you. You could try something like (warning untested) class foo { package { liblcgdm: notify = Exec[ ldconfig::update ], } include ldconfig::update } class ldconfig::update { exec {

Re: [Puppet Users] Re: run stages and mixed class styles

2011-04-29 Thread vagn scott
On 04/29/2011 10:53 AM, jcbollinger wrote: On the conceptual level, what does it or *should* it mean that a node has Class['proxy']? To you it seems to mean that the node positively uses an HTTP proxy, at least for Apt. But it could instead mean that the node's proxy configuration is

Re: [Puppet Users] Re: run stages and mixed class styles

2011-04-29 Thread vagn scott
On 04/29/2011 12:29 PM, R.I.Pienaar wrote: Sounds like you want resource chaining[1] careful though this has an unfortunate side effect that it will also realize all virtual packages with the provider apt onto a node. point is you *can* tweak dependencies as a result of including a

[Puppet Users] run stages and mixed class styles

2011-04-27 Thread vagn scott
I didn't run this (simplified) example so there might be errors, but anyway -- say we have: --- stage { aptstuff: } Stage[aptstuff] - Stage[main] class proxy($url) { file { /etc/apt/apt.conf.d/02proxy: content =

Re: [Puppet Users] provisioning bare metal (best practices)

2011-02-22 Thread vagn scott
Oh, great timing! I'm working on pretty much the same question. I have used FAI and Opsware, and homebrewed scripts to do provisioning in the past. I have never been all that happy with any of them, and am taking another look at the problem to try to get to as simple and portable a solution

  1   2   >