From 1135f32e9a893d505087fdb23a6f7115f8c006e2 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 14 Aug 2017 18:50:51 +0200 Subject: [PATCH] Refs #20271 - remove to_proc syntax --- provisioning_templates/provision/atomic_kickstart_default.erb | 2 +- provisioning_templates/provision/coreos_provision.erb | 2 +- provisioning_templates/provision/kickstart_default.erb | 2 +- provisioning_templates/provision/kickstart_rhel_default.erb | 2 +- provisioning_templates/snippet/coreos_cloudconfig.erb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/provisioning_templates/provision/atomic_kickstart_default.erb b/provisioning_templates/provision/atomic_kickstart_default.erb index 98f632fa..0086c10c 100644 --- a/provisioning_templates/provision/atomic_kickstart_default.erb +++ b/provisioning_templates/provision/atomic_kickstart_default.erb @@ -14,7 +14,7 @@ timezone --utc <%= @host.params['time-zone'] || 'UTC' %> <% dhcp = !@static -%> <% end -%> -network --bootproto <%= dhcp ? 'dhcp' : "static --ip=#{@host.ip} --netmask=#{subnet.mask} --gateway=#{subnet.gateway} --nameserver=#{[subnet.dns_primary, subnet.dns_secondary].select(&:present?).join(',')}" %> --hostname <%= @host %><%= " --device=#{@host.mac}" -%> +network --bootproto <%= dhcp ? 'dhcp' : "static --ip=#{@host.ip} --netmask=#{subnet.mask} --gateway=#{subnet.gateway} --nameserver=#{[subnet.dns_primary, subnet.dns_secondary].select{ |item| item.present? }.join(',')}" %> --hostname <%= @host %><%= " --device=#{@host.mac}" -%> # Partition table should create /boot and a volume atomicos <% if @dynamic -%> diff --git a/provisioning_templates/provision/coreos_provision.erb b/provisioning_templates/provision/coreos_provision.erb index 2336caf7..066fc2ce 100644 --- a/provisioning_templates/provision/coreos_provision.erb +++ b/provisioning_templates/provision/coreos_provision.erb @@ -28,7 +28,7 @@ coreos: X-Conflicts=coreos-bootstrap.service <% if @host.params['ssh_authorized_keys'] -%> ssh_authorized_keys: -<% @host.params['ssh_authorized_keys'].split(',').map(&:strip).each do |ssh_key| -%> +<% @host.params['ssh_authorized_keys'].split(',').map{ |item| item.strip }.each do |ssh_key| -%> - "<%= ssh_key %>" <% end -%> <% else -%> diff --git a/provisioning_templates/provision/kickstart_default.erb b/provisioning_templates/provision/kickstart_default.erb index d234f87c..89a5cf43 100644 --- a/provisioning_templates/provision/kickstart_default.erb +++ b/provisioning_templates/provision/kickstart_default.erb @@ -50,7 +50,7 @@ skipx <% else -%> <% dhcp = !@static -%> <% end -%> -network --bootproto <%= dhcp ? 'dhcp' : "static --ip=#{@host.ip} --netmask=#{subnet.mask} --gateway=#{subnet.gateway} --nameserver=#{[subnet.dns_primary, subnet.dns_secondary].select(&:present?).join(',')}" %> --hostname <%= @host %><%= os_major >= 6 ? " --device=#{@host.mac}" : '' -%> +network --bootproto <%= dhcp ? 'dhcp' : "static --ip=#{@host.ip} --netmask=#{subnet.mask} --gateway=#{subnet.gateway} --nameserver=#{[subnet.dns_primary, subnet.dns_secondary].select{ |item| item.present? }.join(',')}" %> --hostname <%= @host %><%= os_major >= 6 ? " --device=#{@host.mac}" : '' -%> rootpw --iscrypted <%= root_pass %> <% if @host.param_true?('disable-firewall') -%> diff --git a/provisioning_templates/provision/kickstart_rhel_default.erb b/provisioning_templates/provision/kickstart_rhel_default.erb index 93463ce2..d03c40c1 100644 --- a/provisioning_templates/provision/kickstart_rhel_default.erb +++ b/provisioning_templates/provision/kickstart_rhel_default.erb @@ -47,7 +47,7 @@ skipx <% else -%> <% dhcp = !@static -%> <% end -%> -network --bootproto <%= dhcp ? 'dhcp' : "static --ip=#{@host.ip} --netmask=#{subnet.mask} --gateway=#{subnet.gateway} --nameserver=#{[subnet.dns_primary, subnet.dns_secondary].select(&:present?).join(',')}" %> --hostname <%= @host %><%= os_major >= 6 ? " --device=#{@host.mac}" : '' -%> +network --bootproto <%= dhcp ? 'dhcp' : "static --ip=#{@host.ip} --netmask=#{subnet.mask} --gateway=#{subnet.gateway} --nameserver=#{[subnet.dns_primary, subnet.dns_secondary].select{ |item| item.present? }.join(',')}" %> --hostname <%= @host %><%= os_major >= 6 ? " --device=#{@host.mac}" : '' -%> rootpw --iscrypted <%= root_pass %> <% if @host.param_true?('disable-firewall') -%> diff --git a/provisioning_templates/snippet/coreos_cloudconfig.erb b/provisioning_templates/snippet/coreos_cloudconfig.erb index ab95820e..d889c864 100644 --- a/provisioning_templates/snippet/coreos_cloudconfig.erb +++ b/provisioning_templates/snippet/coreos_cloudconfig.erb @@ -99,7 +99,7 @@ name: coreos_cloudconfig <% end -%> <% if @host.params['ssh_authorized_keys'] -%> ssh_authorized_keys: - <% @host.params['ssh_authorized_keys'].split(',').map(&:strip).each do |ssh_key| -%> + <% @host.params['ssh_authorized_keys'].split(',').map{ |item| item.strip }.each do |ssh_key| -%> - "<%= ssh_key %>" <% end -%> <% else -%>