puppet-windows_firewall
puppet-windows_firewall copied to clipboard
windows_firewall::exception program validation doesn't allow windows %VAR%
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 6.5
- Ruby: 2.5
- Distribution: RHEL 7
- Module version: 2.0.2
How to reproduce (e.g Puppet code you use)
windows_firewall::exception { 'SNMP Service (UDP In)':
direction => 'in',
action => 'allow',
protocol => 'UDP',
local_port => 161,
remote_port => 'any',
program => '%SystemRoot%\system32\snmp.exe',
display_name => 'SNMP Service (UDP In)',
description => @(EOT)
Managed by Puppet. Inbound rule for the Simple Network Management Protocol
(SNMP) Service to allow SNMP traffic. [UDP 161]
| EOT
}
What are you seeing
Error: Could not retrieve catalog from remote server:
Error 500 on SERVER: Server Error: Evaluation Error:
Error while evaluating a Resource Statement,
Evaluation Error: Error while evaluating a Function Call, "%SystemRoot%\\system32\\snmp.exe" is not an absolute path.
(file: /etc/puppetlabs/code/environments/development/modules/windows_firewall/manifests/exception.pp, line: 139, column: 7)
(file: /etc/puppetlabs/code/environments/development/modules/xxx/manifests/profile/windows/snmp.pp, line: 66) on node nickwindows.domain.tld
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
What behaviour did you expect instead
I expected to be able to enter in paths with Windows %VAR%
format for the program
parameter
Any additional information you'd like to impart
The default rule for SNMP has this exact configuration and i was trying to mirror it so that it's managed in Puppet: