Ask Your Question
0

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
0

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 => [
    Package['package1'],
    File['something'],
  ],
}

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

Stats

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

Seen: 44 times

Last updated: Jan 21 '16