533 lines
13 KiB
HTML
533 lines
13 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>
|
||
Puppet Class: confdroid_apache::params
|
||
|
||
— Documentation by YARD 0.9.36
|
||
|
||
</title>
|
||
|
||
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
||
|
||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||
|
||
<script type="text/javascript">
|
||
pathId = "puppet_classes::confdroid_apache::params";
|
||
relpath = '../';
|
||
</script>
|
||
|
||
|
||
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
||
|
||
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
||
|
||
|
||
</head>
|
||
<body>
|
||
<div class="nav_wrap">
|
||
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
|
||
<div id="resizer"></div>
|
||
</div>
|
||
|
||
<div id="main" tabindex="-1">
|
||
<div id="header">
|
||
<div id="menu">
|
||
|
||
<a href="../_index.html">Index (c)</a> »
|
||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||
»
|
||
<span class="title">confdroid_apache::params</span>
|
||
|
||
</div>
|
||
|
||
<div id="search">
|
||
|
||
<a class="full_list_link" id="puppet_class_list_link"
|
||
href="../puppet_class_list.html">
|
||
|
||
<svg width="24" height="24">
|
||
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||
</svg>
|
||
</a>
|
||
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
<div id="content"><h1>Puppet Class: confdroid_apache::params</h1>
|
||
<div class="box_info">
|
||
|
||
|
||
<dl>
|
||
<dt>Inherited by:</dt>
|
||
<dd>
|
||
|
||
<span class='object_link'><a href="confdroid_apache_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::confdroid_apache::main::config (puppet_class)">confdroid_apache::main::config</a></span><br/>
|
||
|
||
<span class='object_link'><a href="confdroid_apache_3A_3Aserver_3A_3Adirs.html" title="puppet_classes::confdroid_apache::server::dirs (puppet_class)">confdroid_apache::server::dirs</a></span><br/>
|
||
|
||
<span class='object_link'><a href="confdroid_apache_3A_3Aserver_3A_3Afiles.html" title="puppet_classes::confdroid_apache::server::files (puppet_class)">confdroid_apache::server::files</a></span><br/>
|
||
|
||
<span class='object_link'><a href="confdroid_apache_3A_3Aserver_3A_3Ainstall.html" title="puppet_classes::confdroid_apache::server::install (puppet_class)">confdroid_apache::server::install</a></span><br/>
|
||
|
||
<span class='object_link'><a href="confdroid_apache_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::confdroid_apache::server::service (puppet_class)">confdroid_apache::server::service</a></span><br/>
|
||
|
||
<span class='object_link'><a href="confdroid_apache_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::confdroid_apache::firewall::iptables (puppet_class)">confdroid_apache::firewall::iptables</a></span><br/>
|
||
|
||
<span class='object_link'><a href="confdroid_apache_3A_3Amonitoring_3A_3Atarget.html" title="puppet_classes::confdroid_apache::monitoring::target (puppet_class)">confdroid_apache::monitoring::target</a></span><br/>
|
||
|
||
</dd>
|
||
</dl>
|
||
|
||
<dl>
|
||
<dt>Defined in:</dt>
|
||
<dd>
|
||
manifests/params.pp
|
||
</dd>
|
||
</dl>
|
||
</div>
|
||
|
||
<h2>Summary</h2>
|
||
This class holds all parameters for the confdroid_apache module, which are
|
||
inherited by all classes except defines.
|
||
|
||
<h2>Overview</h2>
|
||
<div class="docstring">
|
||
<div class="discussion">
|
||
|
||
<p>confdroid_apache::params.pp Module name: confdroid_apache Author: 12ww1160 (12ww1160@confdroid.com)</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="tags">
|
||
<p class="tag_title">Parameters:</p>
|
||
<ul class="param">
|
||
|
||
<li>
|
||
|
||
<span class='name'>pkg_ensure</span>
|
||
|
||
|
||
<span class='type'>(<tt>String</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>'present'</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>Specify which package type to use, i.e. <code>latest</code>, <code>present</code> or <code>absent</code>.</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>ae_manage_cfg</span>
|
||
|
||
|
||
<span class='type'>(<tt>Boolean</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>false</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>Whether or not to manage the httpd configuration. httpd is very often a sub system used by many other services, and the required configuration depends on the use case. If using httpd as sub-service ( i.e. for phpmyadmin, Nagios etc.), the main configuration should be done on that end, not in confdroid_apache. IN that case, set <code>ae_manage_cfg</code> to <code>false</code>.</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>ae_manage_dirs</span>
|
||
|
||
|
||
<span class='type'>(<tt>Boolean</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>true</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>Whether or not main directories required to run httpd should be managed. Typically this should be set to true.</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>ae_allow_user_dirs</span>
|
||
|
||
|
||
<span class='type'>(<tt>Boolean</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>false</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>Whether or not to allow user directories should be allowed to share content through httpd. Usually this is a security problem and as such should be disabled.</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>ae_incl_target</span>
|
||
|
||
|
||
<span class='type'>(<tt>Boolean</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>true</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>whether or not to allow nagios monitoring.</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>ae_order_no</span>
|
||
|
||
|
||
<span class='type'>(<tt>String</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>'50'</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>the order number for the firewall rules</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>ae_http_port</span>
|
||
|
||
|
||
<span class='type'>(<tt>String</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>'80'</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>the port to use for the http protocol</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>ae_https_port</span>
|
||
|
||
|
||
<span class='type'>(<tt>String</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>'443'</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>the port to use for the https protocol</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>ae_target_service</span>
|
||
|
||
|
||
<span class='type'>(<tt>String</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>'/etc/nagios/conf.d/httpd_service.cfg'</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>which service to monitor with nagios</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>ae_target_contacts</span>
|
||
|
||
|
||
<span class='type'>(<tt>String</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>'nagiosadmin'</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>which contacts to notify for nagios alerts</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>ae_manage_fw</span>
|
||
|
||
|
||
<span class='type'>(<tt>Boolean</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>true</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>whether to manage firewall settings</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>reqpackages</span>
|
||
|
||
|
||
<span class='type'>(<tt>Array</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>['httpd','mod_ssl']</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>List of packages to install.</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>ae_use_lb</span>
|
||
|
||
|
||
<span class='type'>(<tt>Boolean</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>false</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>whether to use load balancer or not. If true, a configuration file will be created to allow reading the client ips from the X-Forwarded-For header, and the httpd service will be restarted to apply the changes. This is required when using httpd behind a load balancer like haproxy, otherwise all client ips will be logged as the load balancer ip.</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
<li>
|
||
|
||
<span class='name'>ae_trusted_proxy</span>
|
||
|
||
|
||
<span class='type'>(<tt>String</tt>)</span>
|
||
|
||
|
||
<em class="default">(defaults to: <tt>'10.0.1.0/24'</tt>)</em>
|
||
|
||
|
||
—
|
||
<div class='inline'>
|
||
<p>the IP address of the trusted proxy, i.e. the load balancer. This is required when <code>ae_use_lb</code> is set to true, and defaults to ‘10.0.1.0/24’.</p>
|
||
</div>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
|
||
|
||
</div><div class="method_details_list">
|
||
<table class="source_code">
|
||
<tr>
|
||
<td>
|
||
<pre class="lines">
|
||
|
||
|
||
37
|
||
38
|
||
39
|
||
40
|
||
41
|
||
42
|
||
43
|
||
44
|
||
45
|
||
46
|
||
47
|
||
48
|
||
49
|
||
50
|
||
51
|
||
52
|
||
53
|
||
54
|
||
55
|
||
56
|
||
57
|
||
58
|
||
59
|
||
60
|
||
61
|
||
62
|
||
63
|
||
64
|
||
65
|
||
66
|
||
67
|
||
68
|
||
69
|
||
70
|
||
71
|
||
72
|
||
73
|
||
74
|
||
75
|
||
76
|
||
77
|
||
78
|
||
79
|
||
80
|
||
81
|
||
82
|
||
83
|
||
84
|
||
85
|
||
86
|
||
87
|
||
88
|
||
89
|
||
90
|
||
91
|
||
92
|
||
93
|
||
94
|
||
95
|
||
96
|
||
97
|
||
98
|
||
99
|
||
100
|
||
101
|
||
102
|
||
103
|
||
104
|
||
105
|
||
106</pre>
|
||
</td>
|
||
<td>
|
||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 37</span>
|
||
|
||
class confdroid_apache::params (
|
||
|
||
# installation
|
||
String $pkg_ensure = 'present',
|
||
Array $reqpackages = ['httpd','mod_ssl'],
|
||
|
||
# configuration files
|
||
Boolean $ae_manage_cfg = false,
|
||
Boolean $ae_manage_dirs = true,
|
||
Boolean $ae_allow_user_dirs = false,
|
||
|
||
# nagios
|
||
Boolean $ae_incl_target = true,
|
||
String $ae_target_service = '/etc/nagios/conf.d/httpd_service.cfg',
|
||
String $ae_target_contacts = 'nagiosadmin',
|
||
|
||
# firewall
|
||
Boolean $ae_manage_fw = true,
|
||
String $ae_order_no = '50',
|
||
String $ae_http_port = '80',
|
||
String $ae_https_port = '443',
|
||
|
||
# loadbalancer
|
||
Boolean $ae_use_lb = false,
|
||
String $ae_trusted_proxy = '10.0.1.0/24',
|
||
|
||
) {
|
||
# facts
|
||
$fqdn = $facts['networking']['fqdn']
|
||
$domain = $facts['networking']['domain']
|
||
$os_name = $facts['os']['name']
|
||
$os_release = $facts['os']['release']['major']
|
||
|
||
# service
|
||
$ae_service = 'httpd'
|
||
|
||
# directories
|
||
$ae_main_dir = '/etc/httpd'
|
||
$ae_conf_dir = "${ae_main_dir}/conf"
|
||
$ae_conf_d_dir = "${ae_main_dir}/conf.d"
|
||
$ae_conf_mods_d = "${ae_main_dir}/conf.modules.d"
|
||
$ae_var_logs_dir = '/var/log/httpd'
|
||
$ae_logs_dir = "${ae_main_dir}/logs"
|
||
$ae_usr_lib_dir = '/usr/lib64/httpd'
|
||
$ae_usr_mods_dir = "${ae_usr_lib_dir}/modules"
|
||
$ae_mods_dir = "${ae_main_dir}/modules"
|
||
$ae_run_dir = '/run/httpd'
|
||
$ae_run_link = "${ae_main_dir}/run"
|
||
$ae_share_httpd = '/usr/share/httpd'
|
||
$ae_cache_httpd = '/var/cache/httpd'
|
||
|
||
# files
|
||
$ae_conf_file = "${ae_conf_dir}/httpd.conf"
|
||
$ae_conf_file_erb = 'confdroid_apache/httpd_conf.erb'
|
||
$ae_magic_file = "${ae_conf_dir}/magic"
|
||
$ae_magic_file_erb = 'confdroid_apache/magic.erb'
|
||
$ae_ssl_file = "${ae_conf_d_dir}/ssl.conf"
|
||
$ae_ssl_file_erb = 'confdroid_apache/ssl_conf.erb'
|
||
$ae_autoindex_file = "${ae_conf_d_dir}/autoindex.conf"
|
||
$ae_autoindex_erb = 'confdroid_apache/autoindex_conf.erb'
|
||
$ae_userdir_file = "${ae_conf_d_dir}/userdir.conf"
|
||
$ae_userdir_erb = 'confdroid_apache/userdir_conf.erb'
|
||
$ae_index_file = '/var/www/html/index.html'
|
||
$ae_index_erb = 'confdroid_apache/index_html.erb'
|
||
$ae_remoteip_file = '/etc/httpd/conf.d/loadbalancer-remoteip.conf'
|
||
$ae_remoteip_erb = 'confdroid_apache/loadbalancer/remoteip.conf.erb'
|
||
|
||
# includes must be last
|
||
include confdroid_apache::main::config
|
||
}</pre>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="footer">
|
||
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||
</div>
|
||
|
||
</div>
|
||
</body>
|
||
</html> |