Packer & Ansible remote

852 views
Skip to first unread message

Doni

unread,
Feb 5, 2021, 5:17:48 AM2/5/21
to Packer
Hi!

I'm building a centos7 template from iso and use an ssh username / password for authentication. As a provisioner I'm using ansible remote but have no luck connecting to my instance... The generated key in /tmp/ansible-key**** is always empty and ansible can't connect with it. This did work perfectly fine in the past but something must have changed as the the communication over ansible is not working any longer. Do you have a hint for me?

I can provide logs if you need some and the json as well just ask.

Regards
Doni

Doni

unread,
Feb 5, 2021, 5:23:12 AM2/5/21
to Packer
here some verbose log of the ansible run:

packer build --var-file templates/vars.pkrvars.json templates/kvm/centos7/packer-kvm-centos7.json
qemu: output will be in this color.

==> qemu: Retrieving ISO
==> qemu: http://linuxsoft.cern.ch/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso?checksum=sha256%3A07b94e6b1a0b0260b94c83d6bb76b26bf7a310dc78d7a9c7432809fb9bc6194a => /home/USER/packer-cloudstack-templates/packer_cache/e476ea1d3ef3c2e3966a7081ac4239cd5ae5e8a3.iso
==> qemu: Creating floppy disk...
    qemu: Copying files flatly from floppy_files
    qemu: Copying file: templates/ks/CentOS/7/CentOS-7-x86_64-cloud.cfg
    qemu: Done copying files from floppy_files
    qemu: Collecting paths from floppy_dirs
    qemu: Resulting paths from floppy_dirs : []
    qemu: Done copying paths from floppy_dirs
==> qemu: Found port for communicator (SSH, WinRM, etc): 3139.
==> qemu: Looking for available port between 5900 and 6000 on 127.0.0.1
==> qemu: Starting VM, booting from CD-ROM
==> qemu: Waiting 20s for boot...
==> qemu: Connecting to VM via VNC (127.0.0.1:5925)
==> qemu: Typing the boot command over VNC...
    qemu: Not using a NetBridge -- skipping StepWaitGuestAddress
==> qemu: Using ssh communicator to connect: 127.0.0.1
==> qemu: Waiting for SSH to become available...
==> qemu: Connected to SSH!
==> qemu: Provisioning with Ansible...
    qemu: Not using Proxy adapter for Ansible run:
    qemu: Using ssh keys from Packer communicator...
==> qemu: Executing Ansible: ansible-playbook -e packer_build_name="qemu" -e packer_builder_type=qemu -e packer_http_addr=10.0.2.2:0 --ssh-extra-args '-o IdentitiesOnly=yes' -vvvv -e ansible_ssh_private_key_file=/tmp/ansible-key174874968 -i /tmp/packer-provisioner-ansible785963223 /home/USER/packer-cloudstack-templates/templates/kvm/centos7/playbooks/main.yml
    qemu: ansible-playbook 2.10.5
    qemu:   config file = /etc/ansible/ansible.cfg
    qemu:   configured module search path = ['/home/USER/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
    qemu:   ansible python module location = /home/USER/packer-cloudstack-templates/ansible/lib/python3.9/site-packages/ansible
    qemu:   executable location = /home/USER/packer-cloudstack-templates/ansible/bin/ansible-playbook
    qemu:   python version = 3.9.1 (default, Jan 20 2021, 00:00:00) [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)]
    qemu: Using /etc/ansible/ansible.cfg as config file
    qemu: setting up inventory plugins
    qemu: host_list declined parsing /tmp/packer-provisioner-ansible785963223 as it did not pass its verify_file() method
    qemu: script declined parsing /tmp/packer-provisioner-ansible785963223 as it did not pass its verify_file() method
    qemu: auto declined parsing /tmp/packer-provisioner-ansible785963223 as it did not pass its verify_file() method
    qemu: Parsed /tmp/packer-provisioner-ansible785963223 inventory source with ini plugin
    qemu: Loading callback plugin default of type stdout, v2.0 from /home/USER/packer-cloudstack-templates/ansible/lib/python3.9/site-packages/ansible/plugins/callback/default.py
    qemu: Skipping callback 'default', as we already have a stdout callback.
    qemu: Skipping callback 'minimal', as we already have a stdout callback.
    qemu: Skipping callback 'oneline', as we already have a stdout callback.
    qemu:
    qemu: PLAYBOOK: main.yml *************************************************************
    qemu: Positional arguments: /home/USER/packer-cloudstack-templates/templates/kvm/centos7/playbooks/main.yml
    qemu: verbosity: 4
    qemu: connection: smart
    qemu: timeout: 10
    qemu: ssh_extra_args: '-o IdentitiesOnly=yes'
    qemu: become_method: sudo
    qemu: tags: ('all',)
    qemu: inventory: ('/tmp/packer-provisioner-ansible785963223',)
    qemu: extra_vars: ('packer_build_name="qemu"', 'packer_builder_type=qemu', 'packer_http_addr=10.0.2.2:0', 'ansible_ssh_private_key_file=/tmp/ansible-key174874968')
    qemu: forks: 5
    qemu: 1 plays in /home/USER/packer-cloudstack-templates/templates/kvm/centos7/playbooks/main.yml
    qemu:
    qemu: PLAY [Configure new VM] ********************************************************
    qemu:
    qemu: TASK [Gathering Facts] *********************************************************
    qemu: task path: /home/USER/packer-cloudstack-templates/templates/kvm/centos7/playbooks/main.yml:1
    qemu: <127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: root
    qemu: <127.0.0.1> SSH: EXEC ssh -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=3139 -o 'IdentityFile="/tmp/ansible-key174874968"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 '-o IdentitiesOnly=yes' -o ControlPath=/home/ismailli/.ansible/cp/d4ca02e546 127.0.0.1 '/bin/sh -c '"'"'echo ~root && sleep 0'"'"''
    qemu: <127.0.0.1> (255, b'', b'OpenSSH_8.4p1, OpenSSL 1.1.1i FIPS  8 Dec 2020
    debug1: Reading configuration data /home/USER/.ssh/config
    debug1: /home/USER/.ssh/config line 5: Applying options for *
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0
    debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
    debug2: checking match for \'final all\' host 127.0.0.1 originally 127.0.0.1
    debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: not matched \'final\'
    debug2: match not found
    debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only)
    debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
    debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]
    debug3: kex names ok: [curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]
    debug1: configuration requests final Match pass
    debug2: resolve_canonicalize: hostname 127.0.0.1 is address
    debug1: re-parsing configuration
    debug1: Reading configuration data /home/USER/.ssh/config
    debug1: /home/USER/.ssh/config line 5: Applying options for *
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0
    debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
    debug2: checking match for \'final all\' host 127.0.0.1 originally 127.0.0.1
    debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: matched \'final\'
    debug2: match found
    debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1
    debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
    debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]
    debug3: kex names ok: [curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]
    debug3: expanded UserKnownHostsFile \'~/.ssh/known_hosts\' -> \'/home/USER/.ssh/known_hosts\'
    debug3: expanded UserKnownHostsFile \'~/.ssh/known_hosts2\' -> \'/home/USER/.ssh/known_hosts2\'
    debug1: auto-mux: Trying existing master
    debug1: Control socket "/home/USER/.ansible/cp/d4ca02e546" does not exist
    debug2: ssh_connect_direct
    debug1: Connecting to 127.0.0.1 [127.0.0.1] port 3139.
    debug2: fd 4 setting O_NONBLOCK
    debug1: fd 4 clearing O_NONBLOCK
    debug1: Connection established.
    debug3: timeout: 10000 ms remain after connect
    debug1: identity file /tmp/ansible-key174874968 type -1
    debug1: identity file /tmp/ansible-key174874968-cert type -1
    debug1: Local version string SSH-2.0-OpenSSH_8.4
    debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
    debug1: match: OpenSSH_7.4 pat OpenSSH_7.4* compat 0x04000006
    debug2: fd 4 setting O_NONBLOCK
    debug1: Authenticating to 127.0.0.1:3139 as \'root\'
    debug3: put_host_port: [127.0.0.1]:3139
    debug3: hostkeys_foreach: reading file "/home/USER/.ssh/known_hosts"
    debug3: send packet: type 20
    debug1: SSH2_MSG_KEXINIT sent
    debug3: receive packet: type 20
    debug1: SSH2_MSG_KEXINIT received
    debug2: local client KEXINIT proposal
    debug2: KEX algorithms: curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ext-info-c
    debug2: ciphers ctos: aes25...@openssh.com,chacha20...@openssh.com,aes256-ctr,aes12...@openssh.com,aes128-ctr
    debug2: ciphers stoc: aes25...@openssh.com,chacha20...@openssh.com,aes256-ctr,aes12...@openssh.com,aes128-ctr
    debug2: compression ctos: none,zl...@openssh.com,zlib
    debug2: compression stoc: none,zl...@openssh.com,zlib
    debug2: languages ctos: 
    debug2: languages stoc: 
    debug2: first_kex_follows 0 
    debug2: reserved 0 
    debug2: peer server KEXINIT proposal
    debug2: KEX algorithms: curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
    debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
    debug2: ciphers ctos: chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,cast128-cbc,3des-cbc
    debug2: ciphers stoc: chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,cast128-cbc,3des-cbc
    debug2: compression ctos: none,zl...@openssh.com
    debug2: compression stoc: none,zl...@openssh.com
    debug2: languages ctos: 
    debug2: languages stoc: 
    debug2: first_kex_follows 0 
    debug2: reserved 0 
    debug1: kex: algorithm: curve25519-sha256
    debug1: kex: host key algorithm: ecdsa-sha2-nistp256
    debug1: kex: server->client cipher: aes25...@openssh.com MAC: <implicit> compression: none
    debug1: kex: client->server cipher: aes25...@openssh.com MAC: <implicit> compression: none
    debug1: kex: curve25519-sha256 need=32 dh_need=32
    debug1: kex: curve25519-sha256 need=32 dh_need=32
    debug3: send packet: type 30
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
    debug3: receive packet: type 31
    debug1: Server host key: ecdsa-sha2-nistp256 SHA256:Es8Oo2XjdSova3XecTHlqE/TfWdQu5mz0AkCnMBAuIc
    debug3: put_host_port: [127.0.0.1]:3139
    debug3: put_host_port: [127.0.0.1]:3139
    debug3: hostkeys_foreach: reading file "/home/USER/.ssh/known_hosts"
    debug1: checking without port identifier
    debug3: hostkeys_foreach: reading file "/home/USER/.ssh/known_hosts"
    Warning: Permanently added \'[127.0.0.1]:3139\' (ECDSA) to the list of known hosts.
    debug3: send packet: type 21
    debug2: set_newkeys: mode 1
    debug1: rekey out after 4294967296 blocks
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug3: receive packet: type 21
    debug1: SSH2_MSG_NEWKEYS received
    debug2: set_newkeys: mode 0
    debug1: rekey in after 4294967296 blocks
    debug1: Will attempt key: /tmp/ansible-key174874968  explicit
    debug2: pubkey_prepare: done
    debug3: send packet: type 5
    debug3: receive packet: type 7
    debug1: SSH2_MSG_EXT_INFO received
    debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
    debug3: receive packet: type 6
    debug2: service_accept: ssh-userauth
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug3: send packet: type 50
    debug3: receive packet: type 51
    debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
    debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password
    debug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey
    debug3: authmethod_lookup gssapi-with-mic
    debug3: remaining preferred: gssapi-keyex,hostbased,publickey
    debug3: authmethod_is_enabled gssapi-with-mic
    debug1: Next authentication method: gssapi-with-mic
    debug1: Unspecified GSS failure.  Minor code may provide more information\nNo Kerberos credentials available (default cache: KCM:)\n\n
    debug1: Unspecified GSS failure.  Minor code may provide more information\nNo Kerberos credentials available (default cache: KCM:)\n\n
    debug1: Unspecified GSS failure.  Minor code may provide more information\nFeature not available\n\n
    debug2: we did not send a packet, disable method
    debug3: authmethod_lookup gssapi-keyex
    debug3: remaining preferred: hostbased,publickey
    debug3: authmethod_lookup publickey
    debug3: remaining preferred: ,publickey
    debug3: authmethod_is_enabled publickey
    debug1: Next authentication method: publickey
    debug1: Trying private key: /tmp/ansible-key174874968
    Load key "/tmp/ansible-key174874968": invalid format
    debug2: we did not send a packet, disable method
    debug1: No more authentication methods to try.
    ro...@127.0.0.1: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
    ')
    qemu: fatal: [packer-template]: UNREACHABLE! => {
    qemu:     "changed": false,
    qemu:     "msg": "Failed to connect to the host via ssh: OpenSSH_8.4p1, OpenSSL 1.1.1i FIPS  8 Dec 2020
    debug1: Reading configuration data /home/USER/.ssh/config
    debug1: /home/USER/.ssh/config line 5: Applying options for *
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0
    debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
    debug2: checking match for 'final all' host 127.0.0.1 originally 127.0.0.1
    debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: not matched 'final'
    debug2: match not found
    debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only)
    debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
    debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]
    debug3: kex names ok: [curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]
    debug1: configuration requests final Match pass
    debug2: resolve_canonicalize: hostname 127.0.0.1 is address
    debug1: re-parsing configuration
    debug1: Reading configuration data /home/USER/.ssh/config
    debug1: /home/USER/.ssh/config line 5: Applying options for *
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0
    debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
    debug2: checking match for 'final all' host 127.0.0.1 originally 127.0.0.1
    debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: matched 'final'
    debug2: match found
    debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1
    debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
    debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]
    debug3: kex names ok: [curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]
    debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/USER/.ssh/known_hosts'
    debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/USER/.ssh/known_hosts2'
    debug1: auto-mux: Trying existing master
    debug1: Control socket \"/home/USER/.ansible/cp/d4ca02e546\" does not exist
    debug2: ssh_connect_direct
    debug1: Connecting to 127.0.0.1 [127.0.0.1] port 3139.
    debug2: fd 4 setting O_NONBLOCK
    debug1: fd 4 clearing O_NONBLOCK
    debug1: Connection established.
    debug3: timeout: 10000 ms remain after connect
    debug1: identity file /tmp/ansible-key174874968 type -1
    debug1: identity file /tmp/ansible-key174874968-cert type -1
    debug1: Local version string SSH-2.0-OpenSSH_8.4
    debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
    debug1: match: OpenSSH_7.4 pat OpenSSH_7.4* compat 0x04000006
    debug2: fd 4 setting O_NONBLOCK
    debug1: Authenticating to 127.0.0.1:3139 as 'root'
    debug3: put_host_port: [127.0.0.1]:3139
    debug3: hostkeys_foreach: reading file \"/home/USER/.ssh/known_hosts\"
    debug3: send packet: type 20
    debug1: SSH2_MSG_KEXINIT sent
    debug3: receive packet: type 20
    debug1: SSH2_MSG_KEXINIT received
    debug2: local client KEXINIT proposal
    debug2: KEX algorithms: curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ext-info-c
    debug2: ciphers ctos: aes25...@openssh.com,chacha20...@openssh.com,aes256-ctr,aes12...@openssh.com,aes128-ctr
    debug2: ciphers stoc: aes25...@openssh.com,chacha20...@openssh.com,aes256-ctr,aes12...@openssh.com,aes128-ctr
    debug2: compression ctos: none,zl...@openssh.com,zlib
    debug2: compression stoc: none,zl...@openssh.com,zlib
    debug2: languages ctos: 
    debug2: languages stoc: 
    debug2: first_kex_follows 0 
    debug2: reserved 0 
    debug2: peer server KEXINIT proposal
    debug2: KEX algorithms: curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
    debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
    debug2: ciphers ctos: chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,cast128-cbc,3des-cbc
    debug2: ciphers stoc: chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes12...@openssh.com,aes25...@openssh.com,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,cast128-cbc,3des-cbc
    debug2: compression ctos: none,zl...@openssh.com
    debug2: compression stoc: none,zl...@openssh.com
    debug2: languages ctos: 
    debug2: languages stoc: 
    debug2: first_kex_follows 0 
    debug2: reserved 0 
    debug1: kex: algorithm: curve25519-sha256
    debug1: kex: host key algorithm: ecdsa-sha2-nistp256
    debug1: kex: server->client cipher: aes25...@openssh.com MAC: <implicit> compression: none
    debug1: kex: client->server cipher: aes25...@openssh.com MAC: <implicit> compression: none
    debug1: kex: curve25519-sha256 need=32 dh_need=32
    debug1: kex: curve25519-sha256 need=32 dh_need=32
    debug3: send packet: type 30
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
    debug3: receive packet: type 31
    debug1: Server host key: ecdsa-sha2-nistp256 SHA256:Es8Oo2XjdSova3XecTHlqE/TfWdQu5mz0AkCnMBAuIc
    debug3: put_host_port: [127.0.0.1]:3139
    debug3: put_host_port: [127.0.0.1]:3139
    debug3: hostkeys_foreach: reading file \"/home/USER/.ssh/known_hosts\"
    debug1: checking without port identifier
    debug3: hostkeys_foreach: reading file \"/home/USER/.ssh/known_hosts\"
    Warning: Permanently added '[127.0.0.1]:3139' (ECDSA) to the list of known hosts.
    debug3: send packet: type 21
    debug2: set_newkeys: mode 1
    debug1: rekey out after 4294967296 blocks
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug3: receive packet: type 21
    debug1: SSH2_MSG_NEWKEYS received
    debug2: set_newkeys: mode 0
    debug1: rekey in after 4294967296 blocks
    debug1: Will attempt key: /tmp/ansible-key174874968  explicit
    debug2: pubkey_prepare: done
    debug3: send packet: type 5
    debug3: receive packet: type 7
    debug1: SSH2_MSG_EXT_INFO received
    debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
    debug3: receive packet: type 6
    debug2: service_accept: ssh-userauth
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug3: send packet: type 50
    debug3: receive packet: type 51
    debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
    debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password
    debug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey
    debug3: authmethod_lookup gssapi-with-mic
    debug3: remaining preferred: gssapi-keyex,hostbased,publickey
    debug3: authmethod_is_enabled gssapi-with-mic
    debug1: Next authentication method: gssapi-with-mic
    debug1: Unspecified GSS failure.  Minor code may provide more information\nNo Kerberos credentials available (default cache: KCM:)\n\n
    debug1: Unspecified GSS failure.  Minor code may provide more information\nNo Kerberos credentials available (default cache: KCM:)\n\n
    debug1: Unspecified GSS failure.  Minor code may provide more information\nFeature not available\n\n
    debug2: we did not send a packet, disable method
    debug3: authmethod_lookup gssapi-keyex
    debug3: remaining preferred: hostbased,publickey
    debug3: authmethod_lookup publickey
    debug3: remaining preferred: ,publickey
    debug3: authmethod_is_enabled publickey
    debug1: Next authentication method: publickey
    debug1: Trying private key: /tmp/ansible-key174874968
    Load key \"/tmp/ansible-key174874968\": invalid format
    debug2: we did not send a packet, disable method
    debug1: No more authentication methods to try.
    ro...@127.0.0.1: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).",
    qemu:     "unreachable": true
    qemu: }
    qemu:
    qemu: PLAY RECAP *********************************************************************
    qemu: packer-template            : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0
    qemu:
==> qemu: Provisioning step had errors: Running the cleanup provisioner, if present...
==> qemu: Deleting output directory...
Build 'qemu' errored after 5 minutes 57 seconds: Error executing Ansible: Non-zero exit 

Megan Marsh

unread,
Feb 5, 2021, 6:23:51 PM2/5/21
to packe...@googlegroups.com
If this used to work and now doesn't with recent versions of Packer, you may want to set the "use_proxy": true template option to revert to older behavior.

--
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/hashicorp/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 packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/16979b87-b853-4fd2-a054-1e688bd26271n%40googlegroups.com.

Doni

unread,
Feb 5, 2021, 7:04:15 PM2/5/21
to Packer
Hi Megan

nope no luck... tried it out with use_proxy=true & false but both failed. However I was confused as in the documentation it's written, with the false option it should create an adapter with an IP where ansible can connect to... However I can still see that it tries to connect to 127.0.0.1 port 41319 (random port). There is also a task called "qemu: Setting up proxy adapter for Ansible...." but maybe it doesn't work correctly? not sure... Here the new logs (hope they help):

packer build --var-file templates/vars.pkrvars.json templates/kvm/centos7/packer-kvm-centos7.json
qemu: output will be in this color.

==> qemu: Retrieving ISO
==> qemu: http://linuxsoft.cern.ch/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso?checksum=sha256%3A07b94e6b1a0b0260b94c83d6bb76b26bf7a310dc78d7a9c7432809fb9bc6194a => /home/ismailli/stxt/packer-cloudstack-templates/packer_cache/e476ea1d3ef3c2e3966a7081ac4239cd5ae5e8a3.iso
==> qemu: Creating floppy disk...
    qemu: Copying files flatly from floppy_files
    qemu: Copying file: templates/ks/CentOS/7/CentOS-7-x86_64-cloud.cfg
    qemu: Done copying files from floppy_files
    qemu: Collecting paths from floppy_dirs
    qemu: Resulting paths from floppy_dirs : []
    qemu: Done copying paths from floppy_dirs
==> qemu: Found port for communicator (SSH, WinRM, etc): 2747.
==> qemu: Looking for available port between 5900 and 6000 on 127.0.0.1
==> qemu: Starting VM, booting from CD-ROM
==> qemu: Waiting 20s for boot...
==> qemu: Connecting to VM via VNC (127.0.0.1:5914)
==> qemu: Typing the boot command over VNC...
    qemu: Not using a NetBridge -- skipping StepWaitGuestAddress
==> qemu: Using ssh communicator to connect: 127.0.0.1
==> qemu: Waiting for SSH to become available...
==> qemu: Connected to SSH!
==> qemu: Provisioning with Ansible...
    qemu: Setting up proxy adapter for Ansible....
==> qemu: Executing Ansible: ansible-playbook -e packer_build_name="qemu" -e packer_builder_type=qemu -e packer_http_addr=10.0.2.2:0 --ssh-extra-args '-o IdentitiesOnly=yes' -vvvv -e ansible_ssh_private_key_file=/tmp/ansible-key366518867 -i /tmp/packer-provisioner-ansible035937686 /home/ismailli/stxt/packer-cloudstack-templates/templates/kvm/centos7/playbooks/main.yml
    qemu: ansible-playbook 2.10.5
    qemu:   config file = /etc/ansible/ansible.cfg
    qemu:   configured module search path = ['/home/ismailli/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
    qemu:   ansible python module location = /home/ismailli/stxt/packer-cloudstack-templates/ansible/lib/python3.9/site-packages/ansible
    qemu:   executable location = /home/ismailli/stxt/packer-cloudstack-templates/ansible/bin/ansible-playbook
    qemu:   python version = 3.9.1 (default, Jan 20 2021, 00:00:00) [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)]
    qemu: Using /etc/ansible/ansible.cfg as config file
    qemu: setting up inventory plugins
    qemu: host_list declined parsing /tmp/packer-provisioner-ansible035937686 as it did not pass its verify_file() method
    qemu: script declined parsing /tmp/packer-provisioner-ansible035937686 as it did not pass its verify_file() method
    qemu: auto declined parsing /tmp/packer-provisioner-ansible035937686 as it did not pass its verify_file() method
    qemu: Parsed /tmp/packer-provisioner-ansible035937686 inventory source with ini plugin
    qemu: Loading callback plugin default of type stdout, v2.0 from /home/ismailli/stxt/packer-cloudstack-templates/ansible/lib/python3.9/site-packages/ansible/plugins/callback/default.py
    qemu: Skipping callback 'default', as we already have a stdout callback.
    qemu: Skipping callback 'minimal', as we already have a stdout callback.
    qemu: Skipping callback 'oneline', as we already have a stdout callback.
    qemu:
    qemu: PLAYBOOK: main.yml *************************************************************
    qemu: Positional arguments: /home/ismailli/stxt/packer-cloudstack-templates/templates/kvm/centos7/playbooks/main.yml
    qemu: verbosity: 4
    qemu: connection: smart
    qemu: timeout: 10
    qemu: ssh_extra_args: '-o IdentitiesOnly=yes'
    qemu: become_method: sudo
    qemu: tags: ('all',)
    qemu: inventory: ('/tmp/packer-provisioner-ansible035937686',)
    qemu: extra_vars: ('packer_build_name="qemu"', 'packer_builder_type=qemu', 'packer_http_addr=10.0.2.2:0', 'ansible_ssh_private_key_file=/tmp/ansible-key366518867')
    qemu: forks: 5
    qemu: 1 plays in /home/ismailli/stxt/packer-cloudstack-templates/templates/kvm/centos7/playbooks/main.yml
    qemu:
    qemu: PLAY [Configure new VM] ********************************************************
    qemu:
    qemu: TASK [Gathering Facts] *********************************************************
    qemu: task path: /home/ismailli/stxt/packer-cloudstack-templates/templates/kvm/centos7/playbooks/main.yml:1
    qemu: <127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: ismailli
    qemu: <127.0.0.1> SSH: EXEC ssh -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=41319 -o 'IdentityFile="/tmp/ansible-key366518867"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="ismailli"' -o ConnectTimeout=10 '-o IdentitiesOnly=yes' -o ControlPath=/home/ismailli/.ansible/cp/39b57a8161 127.0.0.1 '/bin/sh -c '"'"'echo ~ismailli && sleep 0'"'"''
==> qemu: failed to handshake
    qemu: <127.0.0.1> (255, b'', b'OpenSSH_8.4p1, OpenSSL 1.1.1i FIPS  8 Dec 2020
    debug1: Reading configuration data /home/ismailli/.ssh/config
    debug1: /home/ismailli/.ssh/config line 5: Applying options for *
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0
    debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
    debug2: checking match for \'final all\' host 127.0.0.1 originally 127.0.0.1
    debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: not matched \'final\'
    debug2: match not found
    debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only)
    debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
    debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]
    debug3: kex names ok: [curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]
    debug1: configuration requests final Match pass
    debug2: resolve_canonicalize: hostname 127.0.0.1 is address
    debug1: re-parsing configuration
    debug1: Reading configuration data /home/ismailli/.ssh/config
    debug1: /home/ismailli/.ssh/config line 5: Applying options for *
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0
    debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
    debug2: checking match for \'final all\' host 127.0.0.1 originally 127.0.0.1
    debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: matched \'final\'
    debug2: match found
    debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1
    debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
    debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]
    debug3: kex names ok: [curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]
    debug3: expanded UserKnownHostsFile \'~/.ssh/known_hosts\' -> \'/home/ismailli/.ssh/known_hosts\'
    debug3: expanded UserKnownHostsFile \'~/.ssh/known_hosts2\' -> \'/home/ismailli/.ssh/known_hosts2\'
    debug1: auto-mux: Trying existing master
    debug1: Control socket "/home/ismailli/.ansible/cp/39b57a8161" does not exist
    debug2: ssh_connect_direct
    debug1: Connecting to 127.0.0.1 [127.0.0.1] port 41319.
    debug2: fd 4 setting O_NONBLOCK
    debug1: fd 4 clearing O_NONBLOCK
    debug1: Connection established.
    debug3: timeout: 10000 ms remain after connect
    debug1: identity file /tmp/ansible-key366518867 type -1
    debug1: identity file /tmp/ansible-key366518867-cert type -1
    debug1: Local version string SSH-2.0-OpenSSH_8.4
    debug1: Remote protocol version 2.0, remote software version Go
    debug1: no match: Go
    debug2: fd 4 setting O_NONBLOCK
    debug1: Authenticating to 127.0.0.1:41319 as \'ismailli\'
    debug3: put_host_port: [127.0.0.1]:41319
    debug3: hostkeys_foreach: reading file "/home/ismailli/.ssh/known_hosts"
    debug3: send packet: type 20
    debug1: SSH2_MSG_KEXINIT sent
    debug3: receive packet: type 20
    debug1: SSH2_MSG_KEXINIT received
    debug2: local client KEXINIT proposal
    debug2: KEX algorithms: curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ext-info-c
    debug2: ciphers ctos: aes25...@openssh.com,chacha20...@openssh.com,aes256-ctr,aes12...@openssh.com,aes128-ctr
    debug2: ciphers stoc: aes25...@openssh.com,chacha20...@openssh.com,aes256-ctr,aes12...@openssh.com,aes128-ctr
    debug2: compression ctos: none,zl...@openssh.com,zlib
    debug2: compression stoc: none,zl...@openssh.com,zlib
    debug2: languages ctos: 
    debug2: languages stoc: 
    debug2: first_kex_follows 0 
    debug2: reserved 0 
    debug2: peer server KEXINIT proposal
    debug2: KEX algorithms: curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1
    debug2: host key algorithms: ssh-rsa
    debug2: ciphers ctos: aes12...@openssh.com,chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
    debug2: ciphers stoc: aes12...@openssh.com,chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
    debug2: MACs ctos: hmac-sha...@openssh.com,hmac-sha2-256,hmac-sha1,hmac-sha1-96
    debug2: MACs stoc: hmac-sha...@openssh.com,hmac-sha2-256,hmac-sha1,hmac-sha1-96
    debug2: compression ctos: none
    debug2: compression stoc: none
    debug2: languages ctos: 
    debug2: languages stoc: 
    debug2: first_kex_follows 0 
    debug2: reserved 0 
    debug1: kex: algorithm: curve255...@libssh.org
    debug1: kex: host key algorithm: ssh-rsa
    debug1: kex: server->client cipher: chacha20...@openssh.com MAC: <implicit> compression: none
    debug1: kex: client->server cipher: chacha20...@openssh.com MAC: <implicit> compression: none
    debug1: kex: curve255...@libssh.org need=64 dh_need=64
    debug1: kex: curve255...@libssh.org need=64 dh_need=64
    debug3: send packet: type 30
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
    debug3: receive packet: type 31
    debug1: Server host key: ssh-rsa SHA256:i2fxECWus0sd4+Nt7hbS9fn7NwwMtmCsrgEb9kZGE50
    debug3: put_host_port: [127.0.0.1]:41319
    debug3: put_host_port: [127.0.0.1]:41319
    debug3: hostkeys_foreach: reading file "/home/ismailli/.ssh/known_hosts"
    debug1: checking without port identifier
    debug3: hostkeys_foreach: reading file "/home/ismailli/.ssh/known_hosts"
    Warning: Permanently added \'[127.0.0.1]:41319\' (RSA) to the list of known hosts.
    debug3: send packet: type 21
    debug2: set_newkeys: mode 1
    debug1: rekey out after 134217728 blocks
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug3: receive packet: type 21
    debug1: SSH2_MSG_NEWKEYS received
    debug2: set_newkeys: mode 0
    debug1: rekey in after 134217728 blocks
    debug1: Will attempt key: /tmp/ansible-key366518867  explicit
    debug2: pubkey_prepare: done
    debug3: send packet: type 5
    debug3: receive packet: type 6
    debug2: service_accept: ssh-userauth
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug3: send packet: type 50
    debug3: receive packet: type 51
    debug1: Authentications that can continue: publickey
    debug3: start over, passed a different list publickey
    debug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey
    debug3: authmethod_lookup publickey
    debug3: remaining preferred: ,gssapi-keyex,hostbased,publickey
    debug3: authmethod_is_enabled publickey
    debug1: Next authentication method: publickey
    debug1: Trying private key: /tmp/ansible-key366518867
    debug3: sign_and_send_pubkey: RSA SHA256:pLZc9F9OzBzg10GO05aTSl+O/Nm7Kq90EGPPWQglBBI
    sign_and_send_pubkey: no mutual signature supported
    debug2: we did not send a packet, disable method
    debug1: No more authentication methods to try.
    isma...@127.0.0.1: Permission denied (publickey).
    ')
    qemu: fatal: [packer-template]: UNREACHABLE! => {
    qemu:     "changed": false,
    qemu:     "msg": "Failed to connect to the host via ssh: OpenSSH_8.4p1, OpenSSL 1.1.1i FIPS  8 Dec 2020
    debug1: Reading configuration data /home/ismailli/.ssh/config
    debug1: /home/ismailli/.ssh/config line 5: Applying options for *
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0
    debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
    debug2: checking match for 'final all' host 127.0.0.1 originally 127.0.0.1
    debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: not matched 'final'
    debug2: match not found
    debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only)
    debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
    debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]
    debug3: kex names ok: [curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]
    debug1: configuration requests final Match pass
    debug2: resolve_canonicalize: hostname 127.0.0.1 is address
    debug1: re-parsing configuration
    debug1: Reading configuration data /home/ismailli/.ssh/config
    debug1: /home/ismailli/.ssh/config line 5: Applying options for *
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0
    debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
    debug2: checking match for 'final all' host 127.0.0.1 originally 127.0.0.1
    debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: matched 'final'
    debug2: match found
    debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1
    debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
    debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]
    debug3: kex names ok: [curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]
    debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/ismailli/.ssh/known_hosts'
    debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/ismailli/.ssh/known_hosts2'
    debug1: auto-mux: Trying existing master
    debug1: Control socket \"/home/ismailli/.ansible/cp/39b57a8161\" does not exist
    debug2: ssh_connect_direct
    debug1: Connecting to 127.0.0.1 [127.0.0.1] port 41319.
    debug2: fd 4 setting O_NONBLOCK
    debug1: fd 4 clearing O_NONBLOCK
    debug1: Connection established.
    debug3: timeout: 10000 ms remain after connect
    debug1: identity file /tmp/ansible-key366518867 type -1
    debug1: identity file /tmp/ansible-key366518867-cert type -1
    debug1: Local version string SSH-2.0-OpenSSH_8.4
    debug1: Remote protocol version 2.0, remote software version Go
    debug1: no match: Go
    debug2: fd 4 setting O_NONBLOCK
    debug1: Authenticating to 127.0.0.1:41319 as 'ismailli'
    debug3: put_host_port: [127.0.0.1]:41319
    debug3: hostkeys_foreach: reading file \"/home/ismailli/.ssh/known_hosts\"
    debug3: send packet: type 20
    debug1: SSH2_MSG_KEXINIT sent
    debug3: receive packet: type 20
    debug1: SSH2_MSG_KEXINIT received
    debug2: local client KEXINIT proposal
    debug2: KEX algorithms: curve25519-sha256,curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,ext-info-c
    debug2: ciphers ctos: aes25...@openssh.com,chacha20...@openssh.com,aes256-ctr,aes12...@openssh.com,aes128-ctr
    debug2: ciphers stoc: aes25...@openssh.com,chacha20...@openssh.com,aes256-ctr,aes12...@openssh.com,aes128-ctr
    debug2: compression ctos: none,zl...@openssh.com,zlib
    debug2: compression stoc: none,zl...@openssh.com,zlib
    debug2: languages ctos: 
    debug2: languages stoc: 
    debug2: first_kex_follows 0 
    debug2: reserved 0 
    debug2: peer server KEXINIT proposal
    debug2: KEX algorithms: curve255...@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1
    debug2: host key algorithms: ssh-rsa
    debug2: ciphers ctos: aes12...@openssh.com,chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
    debug2: ciphers stoc: aes12...@openssh.com,chacha20...@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
    debug2: MACs ctos: hmac-sha...@openssh.com,hmac-sha2-256,hmac-sha1,hmac-sha1-96
    debug2: MACs stoc: hmac-sha...@openssh.com,hmac-sha2-256,hmac-sha1,hmac-sha1-96
    debug2: compression ctos: none
    debug2: compression stoc: none
    debug2: languages ctos: 
    debug2: languages stoc: 
    debug2: first_kex_follows 0 
    debug2: reserved 0 
    debug1: kex: algorithm: curve255...@libssh.org
    debug1: kex: host key algorithm: ssh-rsa
    debug1: kex: server->client cipher: chacha20...@openssh.com MAC: <implicit> compression: none
    debug1: kex: client->server cipher: chacha20...@openssh.com MAC: <implicit> compression: none
    debug1: kex: curve255...@libssh.org need=64 dh_need=64
    debug1: kex: curve255...@libssh.org need=64 dh_need=64
    debug3: send packet: type 30
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
    debug3: receive packet: type 31
    debug1: Server host key: ssh-rsa SHA256:i2fxECWus0sd4+Nt7hbS9fn7NwwMtmCsrgEb9kZGE50
    debug3: put_host_port: [127.0.0.1]:41319
    debug3: put_host_port: [127.0.0.1]:41319
    debug3: hostkeys_foreach: reading file \"/home/ismailli/.ssh/known_hosts\"
    debug1: checking without port identifier
    debug3: hostkeys_foreach: reading file \"/home/ismailli/.ssh/known_hosts\"
    Warning: Permanently added '[127.0.0.1]:41319' (RSA) to the list of known hosts.
    debug3: send packet: type 21
    debug2: set_newkeys: mode 1
    debug1: rekey out after 134217728 blocks
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug3: receive packet: type 21
    debug1: SSH2_MSG_NEWKEYS received
    debug2: set_newkeys: mode 0
    debug1: rekey in after 134217728 blocks
    debug1: Will attempt key: /tmp/ansible-key366518867  explicit
    debug2: pubkey_prepare: done
    debug3: send packet: type 5
    debug3: receive packet: type 6
    debug2: service_accept: ssh-userauth
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug3: send packet: type 50
    debug3: receive packet: type 51
    debug1: Authentications that can continue: publickey
    debug3: start over, passed a different list publickey
    debug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey
    debug3: authmethod_lookup publickey
    debug3: remaining preferred: ,gssapi-keyex,hostbased,publickey
    debug3: authmethod_is_enabled publickey
    debug1: Next authentication method: publickey
    debug1: Trying private key: /tmp/ansible-key366518867
    debug3: sign_and_send_pubkey: RSA SHA256:pLZc9F9OzBzg10GO05aTSl+O/Nm7Kq90EGPPWQglBBI
    sign_and_send_pubkey: no mutual signature supported
    debug2: we did not send a packet, disable method
    debug1: No more authentication methods to try.
    isma...@127.0.0.1: Permission denied (publickey).",
    qemu:     "unreachable": true
    qemu: }
    qemu:
    qemu: PLAY RECAP *********************************************************************
    qemu: packer-template            : ok=0    changed=0    unreachable=1    failed=0    skipped=0    rescued=0    ignored=0
    qemu:
==> qemu: Provisioning step had errors: Running the cleanup provisioner, if present...
==> qemu: Deleting output directory...
Build 'qemu' errored after 5 minutes 51 seconds: Error executing Ansible: Non-zero exit status: exit status 4

==> Wait completed after 5 minutes 51 seconds

==> Some builds didn't complete successfully and had errors:
--> qemu: Error executing Ansible: Non-zero exit status: exit status 4

==> Builds finished but no artifacts were created.

Many thanks & Best Regards
Doni
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages