Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple puppet requires

Tags:

puppet

Hi I'd like to make a puppet resource/task dependent on multiple other tasks.

For example:

file{'~/foo':}
file{'~/bar':}
file{'~/foobar':
  require => File['~foo'],
  require => File['~bar']
}

What's the correct syntax to define this?

Thanks

like image 736
Keynan Avatar asked Mar 10 '14 06:03

Keynan


1 Answers

From Language: Data Types

Resource attributes which can optionally accept multiple values (including the relationship metaparameters) expect those values in an array.

file{'~/foo':}
file{'~/bar':}
file{'~/foobar':
  require => [ File['~foo'], File['~bar'] ]
}
like image 141
Raul Andres Avatar answered Nov 15 '22 03:11

Raul Andres