0

I have below code

class dummy::eachtest{

$filename = [1,2,3]

each($filename) |$value| {
file {'/etc/dummy/manifests/${value}':
ensure => 'directory',
 }
}

I got below error when I compile

Could not match |$value| at /etc/dummy/manifests/eachtest.pp:5 on node Got an update need to add future parser in config file

I added parser = future in puppet.conf under [master]

Now I am getting the below error when I compile eachtest.pp manifest

Use of 'import' has been discontinued in favor of a manifest directory

My puppet version is 3.7.3

Olive
  • 25
  • 2
  • 5

1 Answers1

0

Well, the error says it all, really.

Without parser=future there is no each function.

With parser=future, you cannot rely on import anymore. Doing this is a pretty bad idea, anyway. It should be avoidable under all circumstances. If don't see how, please open a new question and detail your manifest layout.

Felix Frank
  • 3,093
  • 1
  • 16
  • 22