Reputation: 1346
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
Upvotes: 28
Views: 33520
Reputation: 3806
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'] ]
}
Upvotes: 61