-2

I'm going over a module and in one of the define statements they call a file resource inside which they have:

file { "ifcfg-${interface}":
  content => template('network/ifcfg-bond.erb'),
  before  => File["ifcfg-${interface}"],
}

my query is what does the "File" portion mean, where would it look for a file e.g. ifcfg-bond0? Looking at that line it doesn't give any clues.

Thanks Dan

1

1 Answer 1

1

before => creates a dependency. So this file has a dependency on itself (which, btw is silly).

templates are located in $puppetroot/modules/$modulename/templates

But yeah, these are really basic things in puppet, so please follow Michael's advice and read a tutorial. It'll explain all this and more in much better detail.

1
  • Thanks, I thought that myself that it had a cyclical check, but needed an expert opinion to be sure.
    – Dan
    Feb 8, 2013 at 22:01

Not the answer you're looking for? Browse other questions tagged .