tmt: Bug: provision VM + ansible

From Fedora CI: https://matrix.to/#/!cfWVeczGVJbiKSlrwi:fedoraproject.org/$pWT2oRW18ucYgnv6-Yyqfbx-9M6UJdLtF1-3lLM1T8A?via=fedoraproject.org&via=fedora.im&via=matrix.org.

It seems when provision --how virtual, and there is a prepare --how ansible step, then the ansible-playbook command is run on the host, and not within the virtual machine. That would be fine, except it is using -i root@localhost

        Command 'ansible-playbook --ssh-common-args '-oForwardX11=no -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oServerAliveInterval=60 -oServerAliveCountMax=5 -oIdentitiesOnly=yes -p10023 -i /var/tmp/tmt/run-022/plans/behave/provision/default-0/id_ecdsa -S/run/user/17122/tmt/tmppk62lju8' -i root@127.0.0.1, /home/praiskup/rh/projects/mock/mock/worktree/praiskup/TF/testing-farm/../mock/integration-tests/setup-playbook/play-tf.yml' returned 4.

        stdout (7/7 lines)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        PLAY [Prepare the testing machine for running Mock tests] **********************

        TASK [Gathering Facts] *********************************************************
        fatal: [root@127.0.0.1]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via scp: scp: SSH protocol v.1 is no longer supported\r\n", "unreachable": true}

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

@happz I was thinking about the comment of reusing the inventory. But I guess you meant reusing within the plan, in which case it makes more sense like that

Ah, yes, definitely in the plan. Re-use by all invocations of ansible-playbook, i.e. not generating the inventory file for each invocation.