store ssh public and private keys on shared info

This commit is contained in:
Megan Marsh 2019-12-13 13:15:03 -08:00
parent 88d4ce37c9
commit ac570e0cc0
1 changed files with 4 additions and 0 deletions

View File

@ -41,6 +41,8 @@ func PlaceholderData() map[string]string {
placeholderData["Password"] = "{{.Password}}"
placeholderData["ConnType"] = "{{.Type}}"
placeholderData["PACKER_RUN_UUID"] = "{{.PACKER_RUN_UUID}}"
placeholderData["SSHPublicKey"] = "{{.SSHPublicKey}}"
placeholderData["SSHPrivateKey"] = "{{.SSHPrivateKey}}"
// Backwards-compatability:
placeholderData["WinRMPassword"] = "{{.WinRMPassword}}"
@ -78,6 +80,8 @@ func PopulateProvisionHookData(state multistep.StateBag) map[string]interface{}
hookData["User"] = commConf.User()
hookData["Password"] = commConf.Password()
hookData["ConnType"] = commConf.Type
hookData["SSHPublicKey"] = commConf.SSHPublicKey
hookData["SSHPrivateKey"] = commConf.SSHPrivateKey
// Backwards compatibility; in practice, WinRMPassword is fulfilled by
// Password.