Skip to content
This repository has been archived by the owner on Aug 1, 2019. It is now read-only.

Commit

Permalink
Fixing deprecation warnings
Browse files Browse the repository at this point in the history
Non instance variable representation is deprecated
so needs to be changed. This change changes varibles
to their instance variable representation.

See more details see:
http://docs.puppetlabs.com/guides/templating.html

Change-Id: Ib77827e01011ef6c0380c9ec7a9d147eafd8ce2f
  • Loading branch information
nibalizer committed Jun 20, 2014
1 parent 6247132 commit 82b9b59
Show file tree
Hide file tree
Showing 28 changed files with 210 additions and 210 deletions.
2 changes: 1 addition & 1 deletion modules/elasticsearch/templates/elasticsearch.default.erb
Expand Up @@ -3,7 +3,7 @@
#ES_GROUP=elasticsearch

# Heap Size (defaults to 256m min, 1g max)
ES_HEAP_SIZE=<%= heap_size %>
ES_HEAP_SIZE=<%= @heap_size %>

# Heap new generation
#ES_HEAP_NEWSIZE=
Expand Down
40 changes: 20 additions & 20 deletions modules/elasticsearch/templates/elasticsearch.yml.erb
Expand Up @@ -135,14 +135,14 @@ node.name: "<%= scope.lookupvar("::hostname") %>"
# Use the Index Status API (<http://localhost:9200/A/_status>) to inspect
# the index status.

<% if es_template_config.has_key?('index.store.compress.stored') then -%>
index.store.compress.stored: <%= es_template_config['index.store.compress.stored'] %>
<% if @es_template_config.has_key?('index.store.compress.stored') then -%>
index.store.compress.stored: <%= @es_template_config['index.store.compress.stored'] %>
<% end -%>
<% if es_template_config.has_key?('index.store.compress.tv') then -%>
index.store.compress.tv: <%= es_template_config['index.store.compress.tv'] %>
<% if @es_template_config.has_key?('index.store.compress.tv') then -%>
index.store.compress.tv: <%= @es_template_config['index.store.compress.tv'] %>
<% end -%>
<% if es_template_config.has_key?('indices.memory.index_buffer_size') then -%>
indices.memory.index_buffer_size: "<%= es_template_config['indices.memory.index_buffer_size'] %>"
<% if @es_template_config.has_key?('indices.memory.index_buffer_size') then -%>
indices.memory.index_buffer_size: "<%= @es_template_config['indices.memory.index_buffer_size'] %>"
<% end -%>

#################################### Paths ####################################
Expand Down Expand Up @@ -188,8 +188,8 @@ indices.memory.index_buffer_size: "<%= es_template_config['indices.memory.index_
#
# Set this property to true to lock the memory:
#
<% if es_template_config.has_key?('bootstrap.mlockall') then -%>
bootstrap.mlockall: <%= es_template_config['bootstrap.mlockall'] %>
<% if @es_template_config.has_key?('bootstrap.mlockall') then -%>
bootstrap.mlockall: <%= @es_template_config['bootstrap.mlockall'] %>
<% else -%>
# bootstrap.mlockall: true
<% end -%>
Expand Down Expand Up @@ -263,17 +263,17 @@ bootstrap.mlockall: <%= es_template_config['bootstrap.mlockall'] %>

# Allow recovery process after N nodes in a cluster are up:
#
<% if es_template_config.has_key?('gateway.recover_after_nodes') then -%>
gateway.recover_after_nodes: <%= es_template_config['gateway.recover_after_nodes'] %>
<% if @es_template_config.has_key?('gateway.recover_after_nodes') then -%>
gateway.recover_after_nodes: <%= @es_template_config['gateway.recover_after_nodes'] %>
<% else -%>
# gateway.recover_after_nodes: 1
<% end -%>

# Set the timeout to initiate the recovery process, once the N nodes
# from previous setting are up (accepts time value):
#
<% if es_template_config.has_key?('gateway.recover_after_time') then -%>
gateway.recover_after_time: <%= es_template_config['gateway.recover_after_time'] %>
<% if @es_template_config.has_key?('gateway.recover_after_time') then -%>
gateway.recover_after_time: <%= @es_template_config['gateway.recover_after_time'] %>
<% else -%>
# gateway.recover_after_time: 5m
<% end -%>
Expand All @@ -282,8 +282,8 @@ gateway.recover_after_time: <%= es_template_config['gateway.recover_after_time']
# are up (and recover_after_nodes is met), begin recovery process immediately
# (without waiting for recover_after_time to expire):
#
<% if es_template_config.has_key?('gateway.expected_nodes') then -%>
gateway.expected_nodes: <%= es_template_config['gateway.expected_nodes'] %>
<% if @es_template_config.has_key?('gateway.expected_nodes') then -%>
gateway.expected_nodes: <%= @es_template_config['gateway.expected_nodes'] %>
<% else -%>
# gateway.expected_nodes: 2
<% end -%>
Expand Down Expand Up @@ -324,8 +324,8 @@ gateway.expected_nodes: <%= es_template_config['gateway.expected_nodes'] %>
# operational within the cluster. Set this option to a higher value (2-4)
# for large clusters (>3 nodes):
#
<% if es_template_config.has_key?('discovery.zen.minimum_master_nodes') then -%>
discovery.zen.minimum_master_nodes: <%= es_template_config['discovery.zen.minimum_master_nodes'] %>
<% if @es_template_config.has_key?('discovery.zen.minimum_master_nodes') then -%>
discovery.zen.minimum_master_nodes: <%= @es_template_config['discovery.zen.minimum_master_nodes'] %>
<% else -%>
# discovery.zen.minimum_master_nodes: 1
<% end -%>
Expand All @@ -345,8 +345,8 @@ discovery.zen.minimum_master_nodes: <%= es_template_config['discovery.zen.minimu
#
# 1. Disable multicast discovery (enabled by default):
#
<% if es_template_config.has_key?('discovery.zen.ping.multicast.enabled') then -%>
discovery.zen.ping.multicast.enabled: <%= es_template_config['discovery.zen.ping.multicast.enabled'] %>
<% if @es_template_config.has_key?('discovery.zen.ping.multicast.enabled') then -%>
discovery.zen.ping.multicast.enabled: <%= @es_template_config['discovery.zen.ping.multicast.enabled'] %>
<% else -%>
# discovery.zen.ping.multicast.enabled: false
<% end -%>
Expand All @@ -356,8 +356,8 @@ discovery.zen.ping.multicast.enabled: <%= es_template_config['discovery.zen.ping
#
# discovery.zen.ping.unicast.hosts: ["host1", "host2:port", "host3[portX-portY]"]
#
<% if es_template_config.has_key?('discovery.zen.ping.unicast.hosts') then -%>
discovery.zen.ping.unicast.hosts: ["<%= es_template_config['discovery.zen.ping.unicast.hosts'].join("\", \"") %>"]
<% if @es_template_config.has_key?('discovery.zen.ping.unicast.hosts') then -%>
discovery.zen.ping.unicast.hosts: ["<%= @es_template_config['discovery.zen.ping.unicast.hosts'].join("\", \"") %>"]
<% end -%>

# EC2 discovery allows to use AWS EC2 API in order to perform discovery.
Expand Down
4 changes: 2 additions & 2 deletions modules/exim/templates/aliases.erb
Expand Up @@ -14,6 +14,6 @@ security: root

gerrit2: root
jenkins: root
<% if sysadmin.length > 0 -%>
root: <%= sysadmin.join(",") %>
<% if @sysadmin.length > 0 -%>
root: <%= @sysadmin.join(",") %>
<% end -%>
2 changes: 1 addition & 1 deletion modules/exim/templates/exim.sysconfig.erb
@@ -1,2 +1,2 @@
DAEMON=yes
QUEUE=<%= queue_interval %>
QUEUE=<%= @queue_interval %>
20 changes: 10 additions & 10 deletions modules/exim/templates/exim4.conf.erb
Expand Up @@ -56,7 +56,7 @@ CONFDIR = <%= scope.lookupvar('exim::params::conf_dir') %>
# +local_domains, +relay_to_domains, and +relay_from_hosts, respectively. They
# are all colon-separated lists:

domainlist local_domains = @<% if mailman_domains.length > 0 -%>:<%= mailman_domains.join(":") %><% end -%>
domainlist local_domains = @<% if @mailman_domains.length > 0 -%>:<%= @mailman_domains.join(":") %><% end -%>

domainlist relay_to_domains =
hostlist relay_from_hosts = 127.0.0.1
Expand Down Expand Up @@ -299,7 +299,7 @@ timeout_frozen_after = 7d
# interlock with other processes, so additional queue runners can be
# started by other means, or by killing and restarting the daemon.

queue_run_max = <%= queue_run_max %>
queue_run_max = <%= @queue_run_max %>

# When this option is set, a delivery process is started whenever a
# message is received, routing is performed, and local deliveries take
Expand All @@ -313,11 +313,11 @@ queue_run_max = <%= queue_run_max %>
# to be queued in this way, and is equivalent to setting
# queue_smtp_domains to "*". See also hold_domains and queue_domains.

<% if queue_smtp_domains != "" -%>
queue_smtp_domains = <%= queue_smtp_domains %>
<% if @queue_smtp_domains != "" -%>
queue_smtp_domains = <%= @queue_smtp_domains %>
<% end %>
<% if mailman_domains.length > 0 -%>
<% if @mailman_domains.length > 0 -%>
# Home dir for your Mailman installation -- aka Mailman's prefix
# directory.
MM_HOME=/var/lib/mailman
Expand All @@ -330,7 +330,7 @@ MM_GID=list
#
# Domains that your lists are in - colon separated list
# you may wish to add these into local_domains as well
domainlist mm_domains=<%= mailman_domains.join(":") %>
domainlist mm_domains=<%= @mailman_domains.join(":") %>
#
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#
Expand Down Expand Up @@ -559,7 +559,7 @@ acl_check_data:

begin routers

<% if mailman_domains.length > 0 -%>
<% if @mailman_domains.length > 0 -%>
# Pick up on messages from our local mailman and route them via our
# special VERP-enabled transport
#
Expand Down Expand Up @@ -621,12 +621,12 @@ mailman_router:
# If the DNS lookup fails, no further routers are tried because of the no_more
# setting, and consequently the address is unrouteable.

<% if smarthost -%>
<% if @smarthost -%>
smarthost:
driver = manualroute
domains = !+local_domains
transport = remote_smtp
route_list = * <%= smarthost %>
route_list = * <%= @smarthost %>
no_more
<% else -%>
dnslookup:
Expand Down Expand Up @@ -754,7 +754,7 @@ address_file:
address_reply:
driver = autoreply

<% if mailman_domains.length > 0 -%>
<% if @mailman_domains.length > 0 -%>
mailman_transport:
driver = pipe
command = MM_WRAP \
Expand Down
2 changes: 1 addition & 1 deletion modules/exim/templates/exim4.default.erb
Expand Up @@ -10,7 +10,7 @@ EX4DEF_VERSION=''
# setting this to 'no' will also disable queueruns from /etc/ppp/ip-up.d/exim4
QUEUERUNNER='combined'
# how often should we run the queue
QUEUEINTERVAL='<%= queue_interval %>'
QUEUEINTERVAL='<%= @queue_interval %>'
# options common to quez-runner and listening daemon
COMMONOPTIONS=''
# more options for the daemon/process running the queue (applies to the one
Expand Down
2 changes: 1 addition & 1 deletion modules/gerrit/templates/contact_information.pub.erb
@@ -1 +1 @@
<%= contactstore_pubkey %>
<%= @contactstore_pubkey %>
116 changes: 58 additions & 58 deletions modules/gerrit/templates/gerrit.config.erb
Expand Up @@ -3,90 +3,90 @@

[gerrit]
basePath = git
canonicalWebUrl = <%= canonicalweburl %>
canonicalWebUrl = <%= @canonicalweburl %>
[database]
type = MYSQL
hostname = <%= mysql_host %>
hostname = <%= @mysql_host %>
database = reviewdb
username = gerrit2
<% if database_poollimit != "" -%>
poolLimit = <%= database_poollimit %>
<% if @database_poollimit != "" -%>
poolLimit = <%= @database_poollimit %>
<% end -%>
connectionpool = true
[auth]
<% if gerrit_contributor_agreement -%>
<% if @gerrit_contributor_agreement -%>
contributorAgreements = true
<% end -%>
type = <%= gerrit_auth_type %>
type = <%= @gerrit_auth_type %>
cookieSecure = true
enableRunAs = true
<% if gerrit_auth_type == 'OPENID_SSO' -%>
openIdSsoUrl = <%= openidssourl %>
<% if @gerrit_auth_type == 'OPENID_SSO' -%>
openIdSsoUrl = <%= @openidssourl %>
<% end -%>
<% if gerrit_auth_type == 'LDAP' -%>
<% if @gerrit_auth_type == 'LDAP' -%>
[ldap]
server = <%= ldap_server %>
accountBase = <%= ldap_account_base %>
<% if ldap_username -%>username = <%= ldap_username %><%end%>
<% if ldap_password -%>password = <%= ldap_password %><%end%>
<% if ldap_accountfullname -%>accountFullName = <%= ldap_accountfullname %><%end%>
accountPattern = <%= ldap_account_pattern %>
accountEmailAddress = <%= ldap_account_email_address %>
sslVerify = <%= ldap_sslverify %>
<% if @ldap_ssh_account_name -%>accountSshUserName = <%= ldap_ssh_account_name %><%end%>
server = <%= @ldap_server %>
accountBase = <%= @ldap_account_base %>
<% if @ldap_username -%>username = <%= @ldap_username %><%end%>
<% if @ldap_password -%>password = <%= @ldap_password %><%end%>
<% if @ldap_accountfullname -%>accountFullName = <%= @ldap_accountfullname %><%end%>
accountPattern = <%= @ldap_account_pattern %>
accountEmailAddress = <%= @ldap_account_email_address %>
sslVerify = <%= @ldap_sslverify %>
<% if @ldap_ssh_account_name -%>accountSshUserName = <%= @ldap_ssh_account_name %><%end%>
<% end %>
[sendemail]
smtpServer = <%= smtpserver %>
from = <%= sendemail_from %>
smtpServer = <%= @smtpserver %>
from = <%= @sendemail_from %>
[container]
user = gerrit2
javaHome = <%= java_home %>
<% if container_heaplimit != "" -%>
heapLimit = <%= container_heaplimit %>
javaHome = <%= @java_home %>
<% if @container_heaplimit != "" -%>
heapLimit = <%= @container_heaplimit %>
<% end -%>
[core]
<% if core_packedgitopenfiles != "" -%>
packedGitOpenFiles = <%= core_packedgitopenfiles %>
<% if @core_packedgitopenfiles != "" -%>
packedGitOpenFiles = <%= @core_packedgitopenfiles %>
<% end -%>
<% if core_packedgitlimit != "" -%>
packedGitLimit = <%= core_packedgitlimit %>
<% if @core_packedgitlimit != "" -%>
packedGitLimit = <%= @core_packedgitlimit %>
<% end -%>
<% if core_packedgitwindowsize != "" -%>
packedGitWindowSize = <%= core_packedgitwindowsize %>
<% if @core_packedgitwindowsize != "" -%>
packedGitWindowSize = <%= @core_packedgitwindowsize %>
<% end -%>
[sshd]
listenAddress = <%= sshd_listen_address %>
<% if sshd_threads != "" -%>
threads = <%= sshd_threads %>
listenAddress = <%= @sshd_listen_address %>
<% if @sshd_threads != "" -%>
threads = <%= @sshd_threads %>
<% end -%>
[httpd]
listenUrl = proxy-https://*:8081/
<% if httpd_maxwait != "" -%>
maxWait = <%= httpd_maxwait %>
<% if @httpd_maxwait != "" -%>
maxWait = <%= @httpd_maxwait %>
<% end -%>
<% if httpd_acceptorthreads != "" -%>
acceptorThreads = <%= httpd_acceptorthreads %>
<% if @httpd_acceptorthreads != "" -%>
acceptorThreads = <%= @httpd_acceptorthreads %>
<% end -%>
<% if httpd_minthreads != "" -%>
minThreads = <%= httpd_minthreads %>
<% if @httpd_minthreads != "" -%>
minThreads = <%= @httpd_minthreads %>
<% end -%>
<% if httpd_maxthreads != "" -%>
maxThreads = <%= httpd_maxthreads %>
<% if @httpd_maxthreads != "" -%>
maxThreads = <%= @httpd_maxthreads %>
<% end -%>
[cache]
directory = cache
[cache "web_sessions"]
maxAge = 1d
[user]
email = <%= email %>
<% commentlinks.each do |commentlink| -%>
[commentlink "<%= commentlink['name'] %>"]
match = "<%= commentlink['match'] %>"
<% if commentlink['link'] != "" -%>
link = "<%= commentlink['link'] %>"
email = <%= @email %>
<% @commentlinks.each do |commentlink| -%>
[commentlink "<%= @commentlink['name'] %>"]
match = "<%= @commentlink['match'] %>"
<% if @commentlink['link'] != "" -%>
link = "<%= @commentlink['link'] %>"
<% end -%>
<% if commentlink['html'] != "" -%>
html = "<%= commentlink['html'] %>"
<% if @commentlink['html'] != "" -%>
html = "<%= @commentlink['html'] %>"
<% end -%>
<% end -%>
[theme]
Expand All @@ -99,13 +99,13 @@
tableOddRowColor = ffffff
tableEvenRowColor = f5f5ff
[melody]
monitoring = <%= enable_melody %>
session = <%= melody_session %>
monitoring = <%= @enable_melody %>
session = <%= @melody_session %>
[plugin "javamelody"]
allowTopMenu = <%= enable_javamelody_top_menu %>
<% if gitweb or cgit -%>
allowTopMenu = <%= @enable_javamelody_top_menu %>
<% if @gitweb or @cgit -%>
[gitweb]
<% if gitweb -%>
<% if @gitweb -%>
revision = "?p=${project}.git;a=commitdiff;h=${commit}"
<% else -%>
type = cgit
Expand All @@ -114,14 +114,14 @@
url = "<%= scope.lookupvar('gerrit::web_repo_url') %>"
<% end -%>
<% end -%>
<% if contactstore == true -%>
<% if @contactstore == true -%>
[contactstore]
appsec = <%= contactstore_appsec %>
url = <%= contactstore_url %>
appsec = <%= @contactstore_appsec %>
url = <%= @contactstore_url %>
<% end -%>
<% if secondary_index == true -%>
<% if @secondary_index == true -%>
[index]
type = <%= secondary_index_type %>
type = <%= @secondary_index_type %>
<% end -%>
[mimetype "image/*"]
safe = true
Expand Down
2 changes: 1 addition & 1 deletion modules/gerrit/templates/replication.config.erb
@@ -1,7 +1,7 @@
# This file is managed by puppet.
# https://git.openstack.org/cgit/openstack-infra/config

<% replication.each do |replication| -%>
<% @replication.each do |replication| -%>
[remote "<%= replication['name'] %>"]
url = <%= replication['url'] %>${name}.git
<% if replication['replicationDelay'] != nil -%>
Expand Down

0 comments on commit 82b9b59

Please sign in to comment.