-
-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Append vhost includes #283
Comments
Same here. I've tried in the past to set this up but to no avail. All I (and you) want to do is add some configs to apache conf. Just some way to amend the virtualhost. Back in 2014, nibalizer said in #19 (comment) that "I don't think its in scope for us to pass in a ton of apache options. The module can set up a basic puppetboard for you if you like, and if you don't like to do that, include everything but the Apache section. And roll your own apache configuration." I've tried "rolling my own" and tried just copying out the apache conf file to set up and puppetboard goes to the docroot but its without a index page and just show the directory content. It's a mess. Back in 2019 I tried this and got some feedback (a year after I asked). The reason I know is I just stumbled upon my question again now that I'm trying to get this working again. vchepkov gave me code (and I'm going to try) which uses erb file. THe link is #243 (comment) b4ldr gave me code too (which I will also try) and documentation link that uses variable, heredoc idea. |
"amending" is an anti-pattern in Puppet, and Here is my profile for reference (it use passenger to serve the application and rely on puppet PKI to grant access to the dashboard): class profile::puppetboard (
String[1] $hostname = 'puppetboard.example.com',
) {
include profile::apache
include profile::python
$puppetboard_path = '/srv/puppetboard/puppetboard/'
class { 'puppetboard':
revision => 'v3.3.0',
puppetdb_port => 8079,
offline_mode => true,
extra_settings => {
'DAILY_REPORTS_CHART_DAYS' => 14,
'GRAPH_FACTS' => [
'aio_agent_version',
'apache_version',
'apt_has_updates',
'apt_reboot_required',
'architecture',
'augeasversion',
'bios_vendor',
'bios_version',
'boardmanufacturer',
'clientversion',
'collectd_version',
'customer',
'docker_client_version',
'docker_server_version',
'domain',
'facterversion',
'freebsd_reboot_required',
'hardwareisa',
'hardwaremodel',
'is_pe',
'is_virtual',
'kernel',
'kernelmajversion',
'kernelrelease',
'kernelversion',
'lsbcodename',
'lsbdistcodename',
'lsbdistid',
'lsbdistrelease',
'lsbmajdistrelease',
'manufacturer',
'netmask',
'operatingsystem',
'operatingsystemmajrelease',
'operatingsystemrelease',
'osfamily',
'package_provider',
'physicalprocessorcount',
'pip_version',
'pkg_has_updates',
'pkg_has_vulnerabilities',
'processorcount',
'puppetversion',
'python2_version',
'python3_version',
'python_version',
'rubyplatform',
'rubyversion',
'selinux',
'service_provider',
'syslog_ng_version',
'systemd',
'systemd_version',
'timezone',
'type',
'virtual',
'virtualbox_version',
'virtualenv_version',
'zfs_version',
'zpool_version',
],
'INVENTORY_FACTS' => "[('Hostname', 'fqdn'), ('Customer', 'customer'), ('Role', 'role'), ('OS', 'lsbdistdescription'), ('Kernel Version', 'kernelrelease'), ('Puppet Version', 'puppetversion')]",
},
}
dehydrated::certificate { $hostname:
}
apache::vhost { $hostname:
port => 443,
docroot => "${puppetboard_path}/public",
aliases => [
{
alias => '/static',
path => "${puppetboard_path}/puppetboard/static",
},
],
manage_docroot => false,
setenv => [
"PUPPETBOARD_SETTINGS ${puppetboard_path}/settings.py",
],
ssl => true,
ssl_ca => "${settings::ssldir}/certs/ca.pem",
ssl_crl => "${settings::ssldir}/crl.pem",
ssl_verify_client => 'require',
passenger_app_root => $puppetboard_path,
passenger_app_type => 'wsgi',
passenger_startup_file => 'wsgi.py',
passenger_python => '/srv/puppetboard/virtenv-puppetboard/bin/python',
passenger_user => 'puppetboard',
* => dehydrated::apache::vhost_attributes($hostname),
}
Class['puppetboard'] ~> Class['apache::service']
} |
Yes. I'm not that quick and sharp as others on this so I struggle. All I want to do is get rid of the preconfigured "Require all granted" in the puppetboard/templates/apache/conf.erb:12: file. I then can just make my own directory section, but with the hard code, I can't get basic auth or any security working. I just need to add:
and somehow get rid of the preconfigured "Require all granted" |
@smortex The other problem with this is I don't know python and there is some sort of "magic" that allows puppetboard to work correctly if I use his "out of the box" setup. If I try to use puppet apache to emulate the Soooo, right now I'm looking at some sort of post hook to just overwrite the %!@## apache .conf file. I guess that's hacking! Pieces of code everywhere. |
Hi, I try to add an include statements to the puppetboard vhost with no luck.
Is there a way to do it?
My last attempt, based on your code digging is:
My wish is to add this
include "/etc/httpd/10-auth_openidc.conf"
in the Vhost definition created by the module right before closing the Virtualhost definitionYou notice I use the (+>) instead of (=>) but with error:
And with (=>) instead I get this error:
I hope you can help me to do this :)
Thank you
The text was updated successfully, but these errors were encountered: