Packer runs Ansible towards a local SSH proxy.

The ansible Packer provisioner runs Ansible playbooks. It dynamically
> creates an Ansible inventory file configured to use SSH, runs an SSH
> server, executes ansible-playbook, and marshals Ansible plays through the
> SSH server to the machine being provisioned by Packer.


https://packer.io/docs/provisioners/ansible.html

For the problem with "too many authentication failures" see
https://packer.io/docs/provisioners/ansible.html#too-many-ssh-keys

In your case you can probably add something like:

"extra_arguments": [ "--ssh-common-args=\"-o IdentityAgent=none\"" ]

to the ansible provisioner.

On Tue, Jan 15, 2019 at 8:34 AM Dan Moutal <[email protected]> wrote:

> I removed that line but it still fails (see the attached log). I should
> add that the corresponding public key was uploaded to Digital Ocean (but I
> I don't know if Packer would use that key).
>
> Looks like it has trouble establishing an ssh connection to 127.0.0.1(I
> don't understand why it would be trying to do that. Why not ssh directly
> into the newly created droplet at DO?) I am pretty sure the sshd is not
> running in my Mac. Should it be?
>
> Thanks for your help so far
>
> On Monday, January 14, 2019 at 10:56:48 PM UTC-8, Rickard von Essen wrote:
>>
>> Remove this line:
>>
>>  "private_key_file=~/.ssh/id_ed25519",
>>
>> It will interfere with how Packer handles the connection towards the VM.
>> (Also I don't see how that key could work, there is not provisioning of it
>> before and not supplied to the VM directly in any way)
>>
>> On Mon, Jan 14, 2019 at 5:31 PM Dan Moutal <[email protected]> wrote:
>>
>>> Here is the playbook. I use this same playboot with vagrant without
>>> issues.
>>>
>>> --
>>> This mailing list is governed under the HashiCorp Community Guidelines -
>>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>>> violation of those guidelines may result in your removal from this mailing
>>> list.
>>>
>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>> IRC: #packer-tool on Freenode
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Packer" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/packer-tool/CAD80A2B-8FF3-4261-B8BF-D8A8605F5505%40moutal.ca
>>> <https://groups.google.com/d/msgid/packer-tool/CAD80A2B-8FF3-4261-B8BF-D8A8605F5505%40moutal.ca?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> --
>>> Dan Moutal
>>>
>>> On Jan 14, 2019, at 1:20 AM, Rickard von Essen <[email protected]>
>>> wrote:
>>>
>>> The shell provisioner fails because of tcsh, see the docs 1)
>>>
>>> The ansible provisioning seems to work but fail on something in your
>>> playbook. Can you provide your playbook?
>>>
>>>
>>> 1) https://packer.io/docs/provisioners/shell.html#freebsd-example
>>>
>>> On Mon, Jan 14, 2019 at 1:57 AM Dan Moutal <[email protected]> wrote:
>>>
>>>> I am just getting started with Packer and have run into some issues.
>>>>
>>>> I am running Packer 1.3.3 installed using homebrew on MacOS 10.14.2 and
>>>> I am having trouble running the Ansible Provisioner. As a troubleshooting
>>>> step I tried using the shell provisioner but that also failed. I don't
>>>> really need the ouse the shell provisioner since I plan to configure
>>>> everything using Ansible but figured it would be a simpler test to
>>>> troubleshoot.
>>>>
>>>> I have attached my packer json builds and the corresponding output.
>>>>
>>>> Run1: Ansible provisioner
>>>> Run2: Shell provisioner
>>>>
>>>> Any help would be appreciated.
>>>>
>>>> --
>>>> This mailing list is governed under the HashiCorp Community Guidelines -
>>>>  https://www.hashicorp.com/community-guidelines.html. Behavior in
>>>> violation of those guidelines may result in your removal from this mailing
>>>> list.
>>>>
>>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>>> IRC: #packer-tool on Freenode
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Packer" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/packer-tool/2fe0ccb6-89a3-4b62-ab5a-0b07a90d1387%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/packer-tool/2fe0ccb6-89a3-4b62-ab5a-0b07a90d1387%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> This mailing list is governed under the HashiCorp Community Guidelines -
>>>  https://www.hashicorp.com/community-guidelines.html. Behavior in
>>> violation of those guidelines may result in your removal from this mailing
>>> list.
>>>
>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>> IRC: #packer-tool on Freenode
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Packer" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/packer-tool/CALz9Rt--YzjOKFU82Q7RgnM4ipLtRgHiY%2B6E8uaGWty-9HoMcg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/packer-tool/CALz9Rt--YzjOKFU82Q7RgnM4ipLtRgHiY%2B6E8uaGWty-9HoMcg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> --
>>> This mailing list is governed under the HashiCorp Community Guidelines -
>>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>>> violation of those guidelines may result in your removal from this mailing
>>> list.
>>>
>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>> IRC: #packer-tool on Freenode
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Packer" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/packer-tool/CAD80A2B-8FF3-4261-B8BF-D8A8605F5505%40moutal.ca
>>> <https://groups.google.com/d/msgid/packer-tool/CAD80A2B-8FF3-4261-B8BF-D8A8605F5505%40moutal.ca?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/b38eb72f-f4b6-4b3b-9478-b06a891cedb4%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/b38eb72f-f4b6-4b3b-9478-b06a891cedb4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt8cG_04258eWHVeGWHD8C1vJ1FUVKv5o3mzwF6oQoSrBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to