bartavelle / language-puppet

A library to work with Puppet manifests, test them and eventually replace everything ruby.
BSD 3-Clause "New" or "Revised" License
51 stars 8 forks source link

support template() with two arguments #142

Closed sylvainfaivre closed 8 years ago

sylvainfaivre commented 8 years ago

Salut, quoi de neuf ?

Avec la release 1.1.4, pour parser un fichier de la release 1.8.0 de https://forge.puppetlabs.com/puppetlabs/apt, j'ai l'erreur :

ERROR: (allnodes) template(): Expects a single argument at # ./modules/apt/manifests/init.pp:93:10

Cela fait référence au code suivant :

file { '/etc/apt/apt.conf.d/15update-stamp': ensure => 'file', content => template('apt/_header.erb', 'apt/15update-stamp.erb'), group => 'root', mode => '0644', owner => 'root', }

PierreR commented 8 years ago

This is a bug. Thanks for reporting ! Just for reference: Here is the puppet spec: https://github.com/puppetlabs/puppet/blob/d2199af906fa5ca19ec0c37c82794934ea4fb4b5/lib/puppet/parser/functions/template.rb#L13 And the Haskell code: https://github.com/bartavelle/language-puppet/blob/31b05feecc03d2ad03d02cdf94f75566c27aa11b/Puppet/Interpreter/Resolve.hs#L470-L471

bartavelle commented 8 years ago

This should work now !

sylvainfaivre commented 8 years ago

fix confirmed