Hey all! I've got a bit of an oddity.

I've upgraded from 3.7 to 4.4 and gone over the upgrade checklist for my 
code, but I'm still getting some catalog errors.


> 2016-05-19 15:06:51 +0000 Puppet (err): Could not retrieve catalog from 
> remote server: Error 400 on SERVER: Evaluation Error: Error while 
> evaluating a Resource Statement, Evaluation Error: Error while evaluating a 
> Resource Statement, Cannot alias Registry_value[register host key 
> Debug.1.00.2073 build copy c:\webservicestore.zip] to 
> ["HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\SshHostKeys\\################"]
>  
> at 
> /etc/puppetlabs/code/environments/production/modules/profiles/manifests/build/scp_copy.pp:5;
>  
> resource ["Registry_value", 
> "HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\SshHostKeys\\##############"]
>  
> already declared at 
> /etc/puppetlabs/code/environments/production/modules/profiles/manifests/build/scp_copy.pp:5
>  
> at 
> /etc/puppetlabs/code/environments/production/modules/profiles/manifests/build/scp_copy.pp:5:5
>  
> at 
> /etc/puppetlabs/code/environments/production/modules/profiles/manifests/build/util/zip_retrieve.pp:12
>  
> on node ##################



It's nothing super fancy, just a SCP script on puppet:
define profiles::build::scp_copy ($sharename = $title, $source, 
$destination) {
    
    # Add the host key to the server if it doesn't already exist.
    # Without this, scp will fail in batch mode because the host might be 
spoofed.
    registry_value { "register host key ${sharename}":
         ensure => present,
         path   => 
"HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\SshHostKeys\\######",     
    
         type   => string,   
         data   => "#######"         
    }
    
    # Copy the file specified in source to destination.
    exec { "copy build ${sharename}":
         provider => 'powershell',
         command  => "pscp -batch -pw ############## 
#############@##############:${source} 
${destination}"
    }
}


Being utilized like:

profiles::build::scp_copy { "${buildType}.${buildNo} build copy 
${zipSaveAbsolutePath}":
        source      => '${buildNo}\\${buildType}.${buildNo}.zip',
        destination => '${zipSaveAbsolutePath}'
    }

I'm sure it's something easy that I'm missing. But I'm quite stuck. Any 
ideas?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c695e60f-3bc6-4ab9-b197-b517139dc2e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to