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

display_name does not default to resource name on version 2.0.0 #70

Open
peterbuniq opened this issue May 31, 2018 · 4 comments
Open

display_name does not default to resource name on version 2.0.0 #70

peterbuniq opened this issue May 31, 2018 · 4 comments
Labels
bug Something isn't working

Comments

@peterbuniq
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 2018.1
  • Ruby: N/A
  • Distribution: N/A
  • Module version: 2.0.0

How to reproduce (e.g Puppet code you use)

windows_firewall::exception { "510 allow http in ${label}":
  ensure       => present,
  direction    => 'in',
  action       => 'Allow',
  enabled      => 'yes',
  protocol     => "${settings['protocol']}",
  local_port   => "${settings['port']}",
  remote_port  => 'any',
  description  => 'Allow inbound http',
}

What are you seeing

Error at line 184 in the windows_firewall module. Duplicate declaration - Exec[set rule ]

What behaviour did you expect instead

display_name to be set from the resource title, as per the module documentation.

Output log

Any additional information you'd like to impart

@juniorsysadmin juniorsysadmin added the bug Something isn't working label Jun 2, 2018
@jmchenra
Copy link

Same for 2.0.1.

@decibelhertz
Copy link

Also on 2.0.2.

Default value should probably be $name or $title at https://github.com/voxpupuli/puppet-windows_firewall/blob/master/manifests/exception.pp#L89

@decibelhertz
Copy link

By way of example, here is what I am having to do as a result of this. Ideally, the resource name would not need to be duplicated into the $display_name variable.

profile::firewall::win_ipv4_firewalls:
  'Netmon ICMPv4-in':
    display_name: 'Netmon ICMPv4-in'
    description: 'Allow in Internet Control Message Protocol from Netmon IPs'
    protocol: ICMPv4
    remote_ip: &NMs '192.168.0.1,192.168.1.1'
  'Netmon NTP-in':
    display_name: 'Netmon NTP-in'
    description: 'Allow in Network Time Protocol from Netmon IPs'
    local_port: 123
    protocol: UDP
    remote_ip: *NMs
    remote_port: any
  'Netmon SNMP-in':
    display_name: 'Netmon SNMP-in'
    description: 'Allow in Simple Network Managment Protocol from Netmon IPs'
    local_port: 161
    protocol: UDP
    remote_ip: *NMs
    remote_port: any

@TomG83
Copy link

TomG83 commented Aug 20, 2019

Also using 2.0.2 with issue still there. I also use same workaround by duplicating resource name to display_name, but if you have dozen+ of rules, it's prone to human errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants