Skip to content

mod proxy class does not allow array of IP addresses in param allow_from #2352

@jmcnatt

Description

@jmcnatt

Describe the Bug

Class apache::mod::proxy parameter allow_from expects a string, but should accept a list (array) of IP addresses.

Error:

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, Class[Apache::Mod::Proxy]: parameter 'allow_from' expects a value of type Undef or String, got Tuple

Expected Behavior

An array of IPs should be accepted, either through hiera or through resource-style declaration.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Add the following to a profile:
include apache

class { 'apache::mod::proxy':
  allow_from => [
    '192.168.0.1',
    '192.168.0.2',
  ],
}

Environment

  • Module version: 8.4.0
  • Platform: CentOS 7

Additional Context

The issue surfaced with this commit that specifically typed the params.

The template proxy.conf.erb even references an array to split.

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