puppetlabs / puppetlabs/puppetlabs-apache
default and default-ssl vhosts are managed unconditionally
Nobody has claimed this yet.
- 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 :
In hiera data :
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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