puppetlabs / puppetlabs/puppetlabs-apache

default and default-ssl vhosts are managed unconditionally

Open
#2,528 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

community feature
Dominant language
Puppet
Stars
356
Forks
1.1k
Avg merge
3m
Merged PRs (30d)
1

Description

Parameters default_vhost & default_ssl_vhost are set to false but I have "Duplicate declaration: Apache::Vhost[default] is already declared at (file: /data/puppet/code/modules/apache/manifests/init.pp, line: 853); cannot redeclare..." If I declare a default vhost with the apache::vhost function

In init.pp :
image

In hiera data :
image

Can you add in init.pp :

  Boolean $create_default_vhost   = true,
...
    if $create_default_vhost {
      ::apache::vhost { 'default':
...
      }
      $ssl_access_log_file = $::osfamily ? {
        'freebsd' => $access_log_file,
        default   => "ssl_${access_log_file}",
      }
      ::apache::vhost { 'default-ssl':
...
      }
    } 

Regards,

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in init.pp at the default_vhost and default_ssl_vhost declarations and compare them with the proposed create_default_vhost parameter and conditional. Done means setting the new parameter to false avoids declaring the default vhosts, while true retains their current management and allows an explicitly declared default vhost without a duplicate declaration.

Written by the indexing model from the issue text.

Assessment

Domain
infrastructure
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.