LoginSignup
1
0

More than 3 years have passed since last update.

packer + ansibleでUNREACHABLE!

Posted at

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"
      ]
    }
  ]

解決。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0