puppet-windows_firewall
puppet-windows_firewall copied to clipboard
Use of any protocol in rule description
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 7
- Ruby:
- Distribution:
- Module version: 4.0.0
How to reproduce (e.g Puppet code you use)
windows_firewall::exception { "trusted $description": ensure => $rulestate, direction => 'in', action => 'allow', enabled => true, protocol => 'any', remote_ip => $hostip, description => "allow all for $description", }
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, Windows_firewall::Exception[trusted bg-01]: parameter 'protocol' expects an undef value or a match for Enum['ICMPv4', 'ICMPv6', 'TCP', 'UDP'], got 'any'
What behaviour did you expect instead
Notice: /Stage[main]/Fw_trusted/Windows_firewall::Exception[trusted bg-01]/Exec[set rule trusted bg-01]/returns: executed successfully
Output log
Any additional information you'd like to impart
The abilities of exception.pp could be expanded if the value 'any' will be added in Enum in line 84 Optional[Enum['any', 'TCP', 'UDP', 'ICMPv4', 'ICMPv6']] $protocol = undef,
This modification allows creating a generic allow rule for fully trusted host without needing to specify several rules with different protocols and ports.