Runtime environment: puppet_version=4.8.1, ruby_version=2.1.9
I have developed my own Custom Type and Provider for use with IIS. One of the Custom Types is 'iis_app', which has the param/namevar physicalpath, as well as properties app_pool and site. On the command line, running `'puppet resource iis_app mytestapp ensure=present physicalpath=d:/inetpub/content/mytestsite/mytestapp site=mytestsite`' works beautifully. However when I put this into a manifest and run 'puppet parser validate ' I encounter an the following error on the property 'site':
iis_app { 'D:/inetpub/content/mytestsite/mytestapp' :
site => 'mytestapp',
ensure => 'present',
app_pool => 'mytestpool',
}
Error: Could not retrieve catalog from remote server: Error 500 on SERVER:
Server Error: Evaluation Error: Error while evaluating a Resource Statement, Syntax error at 'site' at /etc/puppetlabs/code/environments/preprod/site/profile/manifests/.pp:48:5 on node
Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run
I've found that because the puppet parser doesn't check to see if those params and properties are actually valid, that if I change it to the following, it will parse just fine:
iis_app { 'D:/inetpub/content/mytestsite/mytestapp' :
totallynotaproperty => 'mytestapp',
ensure => 'present',
app_pool => 'mytestpool',
}
And so the issue appears to be with the puppet parser and the property 'site'. However I can't find any reference to it as a reserved word or such.
Interestingly, I found [this website](http://www.puppetlinter.com/) that will syntax-check your code for you, and if I paste the above resource in and check it, even that finds issue with the word 'site'. Changing that line to "psite => 'mytestapp'," parses fine however.
I can see several other IIS modules that use 'site' without issue so really unsure as to where my fault may be.
↧