On Apr 15, 2010, at 1:30 AM, Mayank wrote:
> Hi,
> I'm trying to manage some hosts using a single puppetmaster. I
> don't know why but puppet on clients seems to be executing the recipes
> hosted on puppetmaster in a random order which is breaking apart
> dependencies and resulting in a failed run of puppet for first time.
> If I do multiple run of puppet thru puppetd --test, everything gets
> installed and configured properly. However it's very rare that on
> first run I can see puppet managing the configuration and installation
> without fail.
> Is there any way I can bring about serial execution of puppet
> recipes. What I mean by serial execution is that suppose I've a
> site.pp with following content:
>
> package {"ruby-devel": ensure=>latest}
> package {"rubygems": ensure=>latest}
> exec {"install-mysql-gem":
> command=>'gem install mysql',
> path=>"/bin:/usr/bin:/usr/sbin:/sbin",
> require=>[ Package["ruby-devel"], Package["rubygems"]]
> }
>
> Now in many cases puppet tries to execute Exec["install-mysql-gem"]
> before Package["ruby-devel"] or Package["rubygems"] or both.
>
> Is there a way that I can ensure that puppet renders the file in order
> the script is written ?
>
> BTW I'm using CentOS 5.4 with puppet-server-0.24.5-1.el5 and
> puppet-0.24.5-1.el5.
>
> Regards,
> Mayank
I posted about this exact thing yesterday (Subj: require inside define), only
you actually got replies. :)
In my case, it seems as though there's something deep in the heart of Puppet
that always causes 'realize'd resources (User, in this case) to be promoted to
the top of the task list. The User line gets eval'd before everything else
regardless of how many 'require's I put in front of it.
One difference, though, is that I'm using 0.25.4 from the EPEL repo.
-Jim
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
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.