Finally I've also solved my other issue. Don't know though if it's the
right way but I'm overwriting the class.
That's what I have now added to my node config.
class child_proxy inherits apache::mod::proxy {
$proxy_requests = "Off"
File [ "${apache::params::vdir}/proxy.conf"] {
content => template('/path/to/my/own/proxy.conf.erb'),
}
}
class {'child_proxy':}
On Tuesday, November 6, 2012 6:25:17 PM UTC+1, Hugo Rogg wrote:
>
> Hi,
>
> I'm quite new to puppet but feel like making some progress. :)
> Today I started using the puppetlabs-apache module.
>
> Two questions arose from that. I tried understanding by looking at the
> module's code, but too much of that still looks like advanced wizardry to
> me.
> I hope this list is the right place to post my questions.
>
> 1) How can I enable custom modules?
> I try to enable proxy_ajp.
> Creating '/etc/httpd/mod.d/proxy_ajp.load ' manually and puppet will
> remove the module, so I assume puppet knows about the module
> notice: /A2mod[proxy_ajp]/ensure: current_value present, should be absent
> (noop)
>
> How to tell puppet to actually activate the module?
> I've tried this in my node configuration:
> class {'apache::mod::proxy_ajp': }
> as the same semantic worked for the proxy_http module, but now puppet
> complains:
> Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error
> ArgumentError: Could not find declared class apache::mod::proxy_ajp
>
> 2) How to use a different proxy.conf template?
> In this module:
> puppetlabs-apache / manifests / mod / proxy.pp
>
> class apache::mod::proxy (
> $proxy_requests = "Off"
> ) {
> apache::mod { 'proxy': }
> # Template uses $proxy_requests
> file { "${apache::params::vdir}/proxy.conf":
> ensure => present,
> content => template('apache/mod/proxy.conf.erb'),
> }
>
> }
>
> there's a reference to the template proxy.conf.erb which is located in the
> modules folder. How can I override this in my node config (or anywhere
> else)? I want to use a template from a different location, because I
> believe the module should not be modified, just used.
>
>
> Thanks for pointing me in the right direction.
> Hugo
>
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/DGMXMlcXw3YJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.