Ask Your Question

require class:something

asked 2018-03-22 04:16:18 -0600

If I have

class::something {"blah":
 parameter => test

How do I then "require" class::something in another resource?


file {"/etc/something":
 ensure => present,
 require => class::something['blah']
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-05-03 12:17:29 -0600

As per metaparameter documentation require expects resource references (or a list thereof). That means you have to capitalize each part of the custom type's name:

file { '/etc/something':
  ensure  => present,
  require => Class::Something['blah'],

alternatively, if there more than one dependencies

file { '/etc/something':
  ensure  => present,
  require => [Class::Something['blah']],
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

1 follower


Asked: 2018-03-22 04:16:18 -0600

Seen: 23 times

Last updated: May 03