Fedora 37, ansible and KVM vm

I’ve been using ansible to complete the install of new Fedora systems. In particular to install dot directories and config files.

I built a f37 on bare hardware, then ran the ansible-playbook and everything worked as expected.

I then used Cockpit to make a f37 VM from the same netinstall .iso file. No problems noted. Could ssh to it and install SSH keys etc. Ran the same ansible-playbook on it and the playbook hangs at the very start of the playbook and never moves on. Only a Ctrl-C stops the running playbook.

I tried quite a few variants including trying to use the simple ‘ping’ playbook with all the results being the same. Newly installed hardware works while VMs don’t.

Research suggested that the F37 python is too new, 3.11, while ansible expectds 3.9, but the ansible rpms for FC37 do work for playbooks on hardware, so that doesn’t seem to be the issue.

I used the typical ‘-vvv’ command with the playbook and struggled to read the voluminous blue text output. However, the blue output stops immediately before the line where the playbook begins to work on the VM host.

I’ll only post the output from ‘-vv’ as there is much more output from ‘-vvv’ but with the same result.

preese@fed ~/Work/ansible/dots-deploy $ ansible-playbook -vv -i h t1.yml
ansible-playbook [core 2.14.1]
  config file = /home/preese/Work/ansible/dots-deploy/ansible.cfg
  configured module search path = ['/home/preese/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.11/site-packages/ansible
  ansible collection location = /home/preese/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible-playbook
  python version = 3.11.0 (main, Oct 24 2022, 00:00:00) [GCC 12.2.1 20220819 (Red Hat 12.2.1-2)] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True
Using /home/preese/Work/ansible/dots-deploy/ansible.cfg as config file
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: t1.yml ***************************************************************
1 plays in t1.yml

PLAY [dots] ********************************************************************

TASK [Gathering Facts] *********************************************************
task path: /home/preese/Work/ansible/dots-deploy/t1.yml:1
^C [ERROR]: User interrupted execution

The hosts file and .yml file are simple:

preese@fed ~/Work/ansible/dots-deploy $ cat h
  [dots]
  tvm0

  [insecuressh:children]
  dots

  [insecuressh:vars]
  ansible_ssh_common_args='-o StrictHostKeyChecking=no'

The simple .yml file:

preese@fed ~/Work/ansible/dots-deploy $ cat t1.yml
- hosts:
    - dots
  tasks:
    - action: ping

Any suggestions of what to try or explanation for this seemingly odd behavior?

Thanks and happy Holly-days to all.

Aha, two more data points. I created a F35 and F36 VM in Cockpit and ran the playbook. SAME behavior, no install, only option was ctrl-C.

This turns the investigation toward the ansible control host, the F37 system running the ansibile process itself.

The ansible-playbook had worked to VMs when run from the same host running F36 and an earlier ansible.