More robust way to install python to hosts

This commit is contained in:
Timo Makinen 2025-06-18 10:03:57 +00:00
parent 78ac8fc6f4
commit e716951798
2 changed files with 9 additions and 7 deletions

View file

@ -170,12 +170,10 @@
when: inventory_hostname not in result.list_vms
- name: Install python if required
ansible.builtin.command:
argv:
- ssh
- "{{ inventory_hostname }}"
- "{{ virt_install_python_cmd }}"
delegate_to: localhost
ansible.builtin.raw: >-
{{ virt_install_python_cmd | map('quote') | join(' ') }}
args:
executable: /bin/sh
when:
- inventory_hostname not in result.list_vms
- virt_install_python_cmd is defined