[Puppet Users] Re: Why?

2011-08-09 Thread ki_chi_saga
On Aug 9, 8:37 pm, Scott Smith wrote: > I suggest using a notice => Exec["shareall"] in your dfsshare rather than > before. Also make exec{"shareall": refreshonly => true} > > That may or may not help with your problem but either way good design > Thanks I will try this Rgds, Mat -- You receiv

[Puppet Users] Re: Why?

2011-08-09 Thread ki_chi_saga
On Aug 9, 8:23 pm, Stefan Schulte wrote: > If I understand this, »shareall« will only run if both services are up? Thats is correct. > First thing I would do: check what returncode 32 stands for. I've tried but unable to find it. >Then run your manifest in debug mode Good point, I will > If

[Puppet Users] Re: Why?

2011-08-09 Thread ki_chi_saga
>> if you care about order you should make it explicit: Good point, but; > exec { 'a': ... } -> > exec { 'b': ... } -> > exec { 'c': ... } can I really be sure that puppet evaluates this in the sequence of writing? Rgds, Mats ___

Re: [Puppet Users] Question on accessing a variable from another class

2011-08-09 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > modules/rep/templates/test_template.xml.erb > > > But for reusable modules etc. I would recommend you to look into hiera [1] and to combine it with parametrized classes as shown in [2], it makes it quite easy and really extensible. ~pete [1]

Re: [Puppet Users] ANNOUNCE: Puppet Module Tool version 0.3.4

2011-08-09 Thread John Warburton
On 10 August 2011 11:24, Scott Smith wrote: > How will it know which directory in your modulepath to install it? > That's the point. You need to explicitly cd to the correct modulepath directory first. Per my example at the bottom $ cd /path/to/forge/modules $ puppet-module install puppetlabs-lv

Re: [Puppet Users] ANNOUNCE: Puppet Module Tool version 0.3.4

2011-08-09 Thread Scott Smith
How will it know which directory in your modulepath to install it? On Aug 9, 2011 6:02 PM, "John Warburton" wrote: > On 10 August 2011 08:47, James Turnbull wrote: > >> We've just released version 0.3.4 of the puppet-module tool used to >> create and retrieve modules from the Puppet Labs Forge >>

Re: [Puppet Users] ANNOUNCE: Puppet Module Tool version 0.3.4

2011-08-09 Thread John Warburton
On 10 August 2011 08:47, James Turnbull wrote: > We've just released version 0.3.4 of the puppet-module tool used to > create and retrieve modules from the Puppet Labs Forge > (http://forge.puppetlabs.com). > > excellent > Will now be installed into your module path as: > > apache > No, actual

Re: [Puppet Users] Run Stages Behavior

2011-08-09 Thread Denmat
Hi, That's not the behaviour that I see. You must be calling that class in a base class or are you using import statements, which I believe can cause such issues. Cheers, Den On 10/08/2011, at 9:24, Matthew Barker wrote: > Greetings, > > Using the puppet version included in the base debian s

Re: [Puppet Users] Re: Help with retrieving a user's environment variable

2011-08-09 Thread Scott Smith
oraclesids = "proddb1,proddb2" oracle_home_proddb1 = "/oracle/product/10.2.0" ... On Tue, Aug 9, 2011 at 1:49 PM, Corey Osman wrote: > Good suggestions. How about this: > > Create a fact that parses /etc/oratab for the SID. For multiple SIDS > defined in oratab, is it possible to define an arr

[Puppet Users] Run Stages Behavior

2011-08-09 Thread Matthew Barker
Greetings, Using the puppet version included in the base debian squeeze packages (2.6.2-5) and hit some behavior with run stages that seems a bit odd. I have the typical pre,post stages defined in my generic sites.pp manifest and use them in various classes which are used by all nodes connecting t

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

2011-08-09 Thread Dan Bode
On Mon, Aug 8, 2011 at 5:51 AM, Oliver Hookins wrote: > Hi all, > > Recently I've hit against this problem which is proving to be a > formidable foe. We have an in-house developed ENC and use > parameterised classes just about everywhere and as a result enjoy a > fairly flexible way of handing ou

[Puppet Users] Re: Pluginsync hangs indefinitely

2011-08-09 Thread Nathaniel Cook
I have run the code by hand and it works just fine. Here it is: # require 'facter' def addFact(name , cmd) matches = cmd.scan(/\$\{\w+\}/) if ! matches.empty? for i in 0...matches.length match = matches[i]

[Puppet Users] How to subclass a module?

2011-08-09 Thread Haitao Jiang
Hi I defined a module (xyz), which has following directories manifests/init.pp class xyz is defined in init.pp in which I defined a service xyz. Now, I want to have a another variation of xyz, say xyz_new which has a different service start script, that is class xyz_new inherits xyz { Serv

[Puppet Users] Question on accessing a variable from another class

2011-08-09 Thread Chris Hirsch
Hi all, I'm trying to promote module re-use so that if I have a module that deals with ldap and I have setup variables in a common configuration and I want to access those same defaulted variables from another module I can easily do so. Below is how I'm *attempting* to do this and in MY opinion I

[Puppet Users] ANNOUNCE: Puppet Module Tool version 0.3.4

2011-08-09 Thread James Turnbull
Hi all We've just released version 0.3.4 of the puppet-module tool used to create and retrieve modules from the Puppet Labs Forge (http://forge.puppetlabs.com). You can update using Ruby gems: $ gem install puppet-module There are several important changes in this release: * Add ability to ins

Re: [Puppet Users] Pluginsync hangs indefinitely

2011-08-09 Thread Craig White
On Aug 8, 2011, at 3:52 PM, Nathaniel Cook wrote: > I am having an issue with puppet hanging. My system is pretty simple I > have several modules but only one that loads some extra facts. I > configure the client to have pluginsync=true in puppet.conf. On the > first run it creates and signs the

[Puppet Users] Pluginsync hangs indefinitely

2011-08-09 Thread Nathaniel Cook
I am having an issue with puppet hanging. My system is pretty simple I have several modules but only one that loads some extra facts. I configure the client to have pluginsync=true in puppet.conf. On the first run it creates and signs the certificate and the copies the one ruby script for the facts

Re: [Puppet Users] Re: Run command based on OS version

2011-08-09 Thread Stephane Rossan
Facter can help you there. Puppet uses it to determine a bunch of facts about your server. You don't have to have puppet to use it, if you use RHEL or Centos, you can get it through yum. If you run facter lsbdistrelease, will give your version. On 8/8/11 4:30 PM, "Steve" wrote: >That's good to k

[Puppet Users] Re: Help with retrieving a user's environment variable

2011-08-09 Thread Corey Osman
Good suggestions. How about this: Create a fact that parses /etc/oratab for the SID. For multiple SIDS defined in oratab, is it possible to define an array in facter? If not I think comma separated values would do just fine which I would then use sid.split(',') in the puppet manifest to get ea

[Puppet Users] RHEL 5.x "remount" an invalid option to NFS?

2011-08-09 Thread Forrie
I made an adjustment to my puppet config for three systems today, which has the "remount" option set to true in the *.pp, and I see this in the logs on my systems: Execution of '/bin/mount -o remount /home/directory' returned 32: mount.nfs: Invalid argument "remount" is valid to the "mount" comma

Re: [Puppet Users] Why?

2011-08-09 Thread Scott Smith
I suggest using a notice => Exec["shareall"] in your dfsshare rather than before. Also make exec{"shareall": refreshonly => true} That may or may not help with your problem but either way good design On Tue, Aug 9, 2011 at 11:23 AM, Stefan Schulte < stefan.schu...@taunusstein.net> wrote: > On Tu

Re: [Puppet Users] Why?

2011-08-09 Thread Stefan Schulte
On Tue, Aug 09, 2011 at 10:19:26AM -0700, ki_chi_saga wrote: > Hello everybody out there! > Is there anyone who can explain why; > .. > $share1 = "share -F nfs -o ro,anon=0 /jumpstart/install" > $share2 = "share -F

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 c

[Puppet Users] Re: Run command based on OS version

2011-08-09 Thread jcbollinger
On Aug 8, 4:48 pm, Steve wrote: > I'm trying to write a script that runs command based on version of > Redhat OS. For example, if the RHEL version is 6.0, it will run > command. I was able to write file read script in ruby that would read > file and execute but it didn't seem to work in puppet s

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

2011-08-09 Thread jcbollinger
On Aug 8, 7:51 am, Oliver Hookins wrote: > Hi all, > > Recently I've hit against this problem which is proving to be a > formidable foe. We have an in-house developed ENC and use > parameterised classes just about everywhere and as a result enjoy a > fairly flexible way of handing out configurat

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' ], ...

[Puppet Users] Why?

2011-08-09 Thread ki_chi_saga
Hello everybody out there! Is there anyone who can explain why; .. $share1 = "share -F nfs -o ro,anon=0 /jumpstart/install" $share2 = "share -F nfs -o ro,anon=0 /jumpstart/config" dfshare {[$share1,$share2]: b

Re: [Puppet Users] Help with retrieving a user's environment variable

2011-08-09 Thread Daniel Pittman
On Tue, Aug 9, 2011 at 06:02, Matthias Saou wrote: > Corey Osman wrote : > >> I need to get the environment variable ORACLE_SID from the OS.  I know this >> can be done with the following: >> >> $blah = env("PATH") >> >> However, the ORACLE_SID variable is only set under the oracle user account.

Re: [Puppet Users] Help with retrieving a user's environment variable

2011-08-09 Thread Matthias Saou
Corey Osman wrote : > I need to get the environment variable ORACLE_SID from the OS. I know this > can be done with the following: > > $blah = env("PATH") > > However, the ORACLE_SID variable is only set under the oracle user account. > So I would need a way to login as the oracle account fi

[Puppet Users] Re: HP-UX user resource and shared homedir

2011-08-09 Thread Martin Alfke
On Aug 9, 10:27 am, Martin Alfke wrote: > Hi, > > on HP-UX we want some users to have the same homedir. > > Homedir is managed by puppet as file resource. > > We now want to move the users to another primary group. > > useradd.sam complains: > > err: /User[XXX]/gid: change from 3 to 0 failed: Cou

[Puppet Users] HP-UX user resource and shared homedir

2011-08-09 Thread Martin Alfke
Hi, on HP-UX we want some users to have the same homedir. Homedir is managed by puppet as file resource. We now want to move the users to another primary group. useradd.sam complains: err: /User[XXX]/gid: change from 3 to 0 failed: Could not set gid on user[XXX]: Execution of '/usr/sam/lbin/u

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

2011-08-09 Thread Ohad Levy
On Thu, Aug 4, 2011 at 10:33 PM, jcbollinger wrote: > > On Aug 3, 5:34 pm, Craig White wrote: >> sure - that's what Ohad suggested and it's somewhat workable. The issue >> really is that this is a hack workaround. For example, the interface for >> configuring the environment in foreman allows y