Ask Your Question

require => Exec['something'] vs. require => [Exec['something']]

asked 2016-01-20 15:14:37 -0500

pla gravatar image

What is the difference between the two examples shown above? I am trying to figure out how to handle the latter in a Ruby encoded spec file to use with Rspec. Thx!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-01-21 03:32:50 -0500

fvoges gravatar image

They both do the same thing.

The require meta-attribute can be a single resource reference or an array (e.g., when the resource depends on more than one resource).

For example:

package { 'package1': }
package { 'package2': }

file { 'something':
  require => Package['package1'],

file { 'somethingelse':
  require => [

You can find a detailed explanation in the documentation

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2016-01-20 15:14:37 -0500

Seen: 43 times

Last updated: Jan 21 '16