Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows_firewall::exception program validation doesn't allow windows %VAR% #93

Open
nmaludy opened this issue Aug 13, 2019 · 0 comments

Comments

@nmaludy
Copy link
Member

nmaludy commented Aug 13, 2019

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:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant