diff --git a/group_vars/openbsd.yml b/group_vars/openbsd.yml index 107ec1e..6fdbdb1 100644 --- a/group_vars/openbsd.yml +++ b/group_vars/openbsd.yml @@ -15,4 +15,8 @@ num_cpus: 2 # extra args for virt-install virt_install_os_args: --cdrom {{ boot_url }}/openbsd/openbsd.iso virt_install_os_variant: openbsd7.6 -virt_install_python_cmd: pkg_add -I -x python%3 +virt_install_python_cmd: + - pkg_add + - -I + - -x + - python%3 diff --git a/playbooks/include/deploy-kvm-guest.yml b/playbooks/include/deploy-kvm-guest.yml index 5464cd5..e7c0262 100644 --- a/playbooks/include/deploy-kvm-guest.yml +++ b/playbooks/include/deploy-kvm-guest.yml @@ -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