packerからansibleでprovisioningするときに、こういうエラーでた。
googlecompute: PLAY [all] *********************************************************************
googlecompute:
googlecompute: TASK [Gathering Facts] *********************************************************
==> googlecompute: failed to handshake
googlecompute: fatal: [default]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added '[127.0.0.1]:53116' (RSA) to the list of known hosts.\r\nReceived disconnect from 127.0.0.1 port 53116:2: too many authentication failures\r\nDisconnected from 127.0.0.1 port 53116", "unreachable": true}
googlecompute: to retry, use: --limit @/xxx
googlecompute:
色々探して、ここにたどり着く。
https://github.com/hashicorp/packer/issues/5329
"provisioners": [
{
"type": "ansible",
"playbook_file": "../ansible/master-image-playbook.yml",
"extra_arguments": [
"--ssh-extra-args",
"-o IdentitiesOnly=yes"
]
}
]
解決。