diff options
author | Ken Barber <ken@bob.sh> | 2011-12-04 16:57:26 +0000 |
---|---|---|
committer | Ken Barber <ken@bob.sh> | 2011-12-04 19:13:29 +0000 |
commit | 61f3572b91b7b91dfd85c9fb576b4088caf335d7 (patch) | |
tree | b548680ae32945e5ecaf3c1d97e64a85359c9e01 | |
parent | 7d0a1e564f73c23ea2ca4d134b3a319598243c29 (diff) |
(#11155) Fix templates so they are ruby-1.9.2 compatible
The templates had #each methods being called on strings which is not ruby-1.9.2
compatible. Instead, I've converted the string to an array using a pattern that
is still compatible if an array is passed.
-rw-r--r-- | templates/ntp.conf.debian.erb | 2 | ||||
-rw-r--r-- | templates/ntp.conf.el.erb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/ntp.conf.debian.erb b/templates/ntp.conf.debian.erb index f51414f..77da814 100644 --- a/templates/ntp.conf.debian.erb +++ b/templates/ntp.conf.debian.erb @@ -20,7 +20,7 @@ filegen clockstats file clockstats type day enable # pool: <http://www.pool.ntp.org/join.html> # Managed by puppet class { "ntp": servers => [ ... ] } -<% servers_real.each do |server| -%> +<% [servers_real].flatten.each do |server| -%> server <%= server %> <% end -%> diff --git a/templates/ntp.conf.el.erb b/templates/ntp.conf.el.erb index db2aa9c..fc308cc 100644 --- a/templates/ntp.conf.el.erb +++ b/templates/ntp.conf.el.erb @@ -16,7 +16,7 @@ restrict -6 ::1 # Please consider joining the pool (http://www.pool.ntp.org/join.html). # Managed by puppet class { "ntp": servers => [ ... ] } -<% servers_real.each do |server| -%> +<% [servers_real].flatten.each do |server| -%> server <%= server %> <% end -%> |