Re: [Puppet Users] Problem with if resource ordering

10 views
Skip to first unread message

Felix Frank

unread,
Apr 14, 2014, 11:28:33 AM4/14/14
to puppet...@googlegroups.com
Hi,

have you ever had this on resolved? If not, this is likely the
information you are lacking:

http://docs.puppetlabs.com/learning/ordering.html#metaparameters-resource-references-and-ordering

HTH,
Felix

On 03/13/2014 10:35 AM, Luis León wrote:
> I have a problem with if statements, they execute first of all, for
> example the next code inside a class that is placed the last resource on
> node definition:
>
> exec { 'rabbitmqctl stop_app':
> }
> if $rabbitmq_version == '2.8.7-1' {
> exec { 'rabbitmqctl reset':
> }
>
> exec { "rabbitmqctl cluster rabbit@$cluster":
> }
> }
> elsif $rabbitmq_version == '3.2.2-1' {
> exec { "rabbitmqctl join_cluster rabbit@$cluster":
> }
> }
> exec { 'rabbitmqctl start_app':
> }
>
> The commands inside the if or elsif conditions are executed first, but i
> don't want this. I think to call another subclass inside the if/elsif
> conditions.
> What do you think? Is there
Reply all
Reply to author
Forward
0 new messages