Skip to content

Destination/Source accepts array but only use the first element #1065

Open
@elfranne

Description

@elfranne

For example:

firewall { '200 http https':
  dport       => [80, 443],
  proto       => 'tcp',
  destination => ['1.2.3.4', '2.3.4.5'],
  action      => 'accept'
}

Puppet will only include the first IP in the firewall rule. There is no error or warning.

If you want to add multiple IP in a single firewall rule with Puppet you can use the ipset module:

ipset::set { 'web':
  set    => ['1.2.3.4', '2.3.4.5'],
}
firewall { '200 http https':
  dport   => [80, 443],
  proto   => 'tcp',
  ipset   => 'web dst',
  action  => 'accept'
  require => Ipset::Set['web'],
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions