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 ##################
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}" }}profiles::build::scp_copy { "${buildType}.${buildNo} build copy ${zipSaveAbsolutePath}": source => '${buildNo}\\${buildType}.${buildNo}.zip', destination => '${zipSaveAbsolutePath}' }