mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Update directory structure & allow to configure paths (tmp, log, cache)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
Templates
|
||||
=========
|
||||
|
||||
Puppet supports templates and templating via ERB, which is part of the Ruby
|
||||
standard library and is used for many other projects including Ruby on Rails.
|
||||
Templates allow you to manage the content of template files, for example
|
||||
configuration files that cannot yet be managed as a Puppet type. Learn more at
|
||||
http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Templating
|
||||
|
||||
You can use templates like this:
|
||||
|
||||
class myclass {
|
||||
package { mypackage: ensure => latest }
|
||||
service { myservice: ensure => running }
|
||||
file { "/etc/myfile":
|
||||
content => template("mymodule/myfile.erb")
|
||||
}
|
||||
}
|
||||
|
||||
The templates are searched for in:
|
||||
|
||||
$templatedir/mymodule/myfile.erb
|
||||
$modulepath/mymodule/templates/myfile.erb
|
@@ -0,0 +1,5 @@
|
||||
<%- @environment_variables.keys.sort.each do |key| -%>
|
||||
<%- if @environment_variables[key] != 'UNSET' -%>
|
||||
<%= key %>=<%= @environment_variables[key] %>
|
||||
<%- end -%>
|
||||
<%- end -%>
|
@@ -0,0 +1,56 @@
|
||||
% This file managed by Puppet
|
||||
% Template Path: <%= @module_name %>/templates/rabbitmq.config
|
||||
[
|
||||
{rabbit, [
|
||||
<% if @ldap_auth -%>
|
||||
{auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]},
|
||||
<% end -%>
|
||||
<% if @config_cluster -%>
|
||||
{cluster_nodes, {[<%= @r_cluster_nodes.map { |n| "\'rabbit@#{n}\'" }.join(', ') %>], <%= @cluster_node_type %>}},
|
||||
{cluster_partition_handling, <%= @cluster_partition_handling %>},
|
||||
<% end -%>
|
||||
<%- if @ssl_only -%>
|
||||
{tcp_listeners, []},
|
||||
<%- end -%>
|
||||
<%- if @ssl -%>
|
||||
{ssl_listeners, [<%= @ssl_management_port %>]},
|
||||
{ssl_options, [{cacertfile,"<%= @ssl_cacert %>"},
|
||||
{certfile,"<%= @ssl_cert %>"},
|
||||
{keyfile,"<%= @ssl_key %>"},
|
||||
{verify,<%= @ssl_verify %>},
|
||||
{fail_if_no_peer_cert,<%= @ssl_fail_if_no_peer_cert %>}]},
|
||||
<%- end -%>
|
||||
<% if @config_variables -%>
|
||||
<%- @config_variables.keys.sort.each do |key| -%>
|
||||
{<%= key %>, <%= @config_variables[key] %>},
|
||||
<%- end -%>
|
||||
<%- end -%>
|
||||
{default_user, <<"<%= @default_user %>">>},
|
||||
{default_pass, <<"<%= @default_pass %>">>}
|
||||
]}<% if @config_kernel_variables -%>,
|
||||
{kernel, [
|
||||
<%= @config_kernel_variables.sort.map{|k,v| "{#{k}, #{v}}"}.join(",\n ") %>
|
||||
]}
|
||||
<%- end -%>
|
||||
<% if @config_stomp -%>,
|
||||
% Configure the Stomp Plugin listening port
|
||||
{rabbitmq_stomp, [
|
||||
{tcp_listeners, [<%= @stomp_port %>]}
|
||||
<%- if @ssl_stomp_port -%>,
|
||||
{ssl_listeners, [<%= @ssl_stomp_port %>]}
|
||||
<%- end -%>
|
||||
]}
|
||||
<% end -%>
|
||||
<%- if @ldap_auth -%>,
|
||||
% Configure the LDAP authentication plugin
|
||||
{rabbitmq_auth_backend_ldap, [
|
||||
{other_bind, anon},
|
||||
{servers, ["<%= @ldap_server %>"]},
|
||||
{user_dn_pattern, "<%= @ldap_user_dn_pattern %>"},
|
||||
{use_ssl, <%= @ldap_use_ssl %>},
|
||||
{port, <%= @ldap_port %>},
|
||||
{log, <%= @ldap_log %>}
|
||||
]}
|
||||
<%- end -%>
|
||||
].
|
||||
% EOF
|
Reference in New Issue
Block a user