$dirs = ["/tmp/foo", "/tmp/bar", "/tmp/baz"]file { $dirs: ensure => directory}#I don't know if this would get what you wantfile { "${dirs}/test.txt": ensure => present, content => "test\n"}