Skip to content

Can't add multiple Listen entries #8

@skrussell

Description

@skrussell

We have a need to add multiple specific "Listen" directives in the httpd.conf file, but I don't seem to be able to.

The following code:

$profile::bind_addresses.each |Integer $index, Stdlib::IP::Address $ip_addr| {
  apache_directive { "set_apache_listen_address_${index}":
    ensure => 'present',
    name   => 'Listen',
    args   => "${ip_addr}:80"
  }   
}

simply results in:

Cannot alias Apache_directive[set_apache_listen_address_1] to [nil, "Listen", nil] at (file: /etc/puppetlabs/code/environments/rk_test/site/apache/manifests/init.pp, line: 56); resource ["Apache_directive", nil, "Listen", nil] already declared (file: /etc/puppetlabs/code/environments/rk_test/site/apache/manifests/init.pp, line: 56)

I know this is probably a small use case, but having multiple Listen directives is valid syntax in Apache, so I'm filing this issue report as I think this needs a fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions