This is being tracked in https://github.com/ansible/ansible/issues/57542

The problem is that Ansible ssh pipelining does not work with the packer
ssh proxy.  To a further extent, the new python interpreter discovery in
ansible 2.8 uses pipelining.

You can set ansible_python_interpreter=/usr/bin/python3.6 (or whatever
interpreter you want to use), and then also ensure that you have pipelining
turned off.

On Wed, Jul 31, 2019 at 10:26 PM Bob Tanner <b...@tanners.org> wrote:

> I can ssh to the public IP address of the Packer AMI but Ansible being run
> as a provisioner in Packer shows this log:
>
>     amazon-ebs: <127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: ubuntu
>     amazon-ebs: <127.0.0.1> SSH: EXEC ssh -vvv -o IdentitiesOnly=yes -o
> StrictHostKeyChecking=no -o Port=50328 -o
> 'IdentityFile="/var/folders/y_/w_pbl7355vg3gv5xkmsld49m0000gn/T/ansible-key347004316"'
> -o KbdInteractiveAuthentication=no -o
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
> -o PasswordAuthentication=no -o 'User="ubuntu"' -o ConnectTimeout=10
> 127.0.0.1 '/bin/sh -c '"'"'/usr/bin/python3.6 && sleep 0'"'"''
> 2019/07/31 22:18:52 packer: 2019/07/31 22:18:52 SSH proxy: accepted
> connection
> 2019/07/31 22:18:52 packer: 2019/07/31 22:18:52 authentication attempt
> from 127.0.0.1:50333 to 127.0.0.1:50328 as ubuntu using none
> 2019/07/31 22:18:52 packer: 2019/07/31 22:18:52 authentication attempt
> from 127.0.0.1:50333 to 127.0.0.1:50328 as ubuntu using publickey
> 2019/07/31 22:18:52 packer: 2019/07/31 22:18:52 new env request:
> LANG=en_US.UTF-8
> 2019/07/31 22:18:52 packer: 2019/07/31 22:18:52 new exec request: /bin/sh
> -c '/usr/bin/python3.6 && sleep 0'
> 2019/07/31 22:18:52 packer: 2019/07/31 22:18:52 [INFO] 1234 bytes written
> for 'stdin'
> 2019/07/31 22:18:52 [INFO] 1234 bytes written for 'stdin'
> 2019/07/31 22:18:52 packer: 2019/07/31 22:18:52 [DEBUG] Opening new ssh
> session
> 2019/07/31 22:18:52 packer: 2019/07/31 22:18:52 [DEBUG] starting remote
> command: /bin/sh -c '/usr/bin/python3.6 && sleep 0'
>
> As I understand it Packer running an ssh proxy
>
> $ telnet localhost port
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> SSH-2.0-Go
>
> So Packer (Go) is being a proxy to the Packer AMI but I never see any sort
> of login attempts in /var/log/syslog on the Packer AMI then I try to "ssh
> 127.0.0.1 port"
>
> Even more weird, in a terminal windows, not trying to run python, just
> attempting to get a shell (complete log at
> https://gist.github.com/basictheprogram/3696f33543a0edc7eacdee76c54c8452)
>
> shell request failed on channel 0
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/ab0884b8-ce2e-47c1-843f-c1a1eb5ca890%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/ab0884b8-ce2e-47c1-843f-c1a1eb5ca890%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Matt Martz
@sivel
sivel.net

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v8brcSySc8RSPUjn_UJ4Xz0eDrVBxvoymrzUjWJrc%2Beiw%40mail.gmail.com.

Reply via email to