From 3fffc726c2b5c56ff995b7f65be888563ef33a22 Mon Sep 17 00:00:00 2001 From: Mike Dorman Date: Wed, 17 Sep 2014 16:26:04 -0600 Subject: [PATCH] Add quotes for bareword instances of 'type' In Puppet 3.7.x, 'type' is now a reserved word. So it must be quoted to avoid reserved word usage errors. Closes-Bug: 1370748 Change-Id: I3bb9b0482baebdce549faa1aaf2b0f6073c95e90 --- manifests/init.pp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index adcd3a996..6ac0a3b65 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -406,25 +406,25 @@ class nova( } if $nova_public_key { - if ! $nova_public_key[key] or ! $nova_public_key[type] { + if ! $nova_public_key[key] or ! $nova_public_key['type'] { fail('You must provide both a key type and key data.') } ssh_authorized_key { 'nova-migration-public-key': ensure => present, key => $nova_public_key[key], - type => $nova_public_key[type], + type => $nova_public_key['type'], user => 'nova', require => File['/var/lib/nova/.ssh'], } } if $nova_private_key { - if ! $nova_private_key[key] or ! $nova_private_key[type] { + if ! $nova_private_key[key] or ! $nova_private_key['type'] { fail('You must provide both a key type and key data.') } - $nova_private_key_file = $nova_private_key[type] ? { + $nova_private_key_file = $nova_private_key['type'] ? { 'ssh-rsa' => '/var/lib/nova/.ssh/id_rsa', 'ssh-dsa' => '/var/lib/nova/.ssh/id_dsa', 'ssh-ecdsa' => '/var/lib/nova/.ssh/id_ecdsa', @@ -432,7 +432,7 @@ class nova( } if ! $nova_private_key_file { - fail("Unable to determine name of private key file. Type specified was '${nova_private_key[type]}' but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.") + fail("Unable to determine name of private key file. Type specified was '${nova_private_key['type']}' but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.") } file { $nova_private_key_file: