Force python3 install when provisioning OpenBSD
This commit is contained in:
parent
51aa0a709e
commit
f60fb7f88c
2 changed files with 9 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
# fix python path errors
|
||||
ansible_python_interpreter: "/usr/bin/env python"
|
||||
ansible_python_interpreter: "/usr/local/bin/python3"
|
||||
|
||||
# we have real wheel group
|
||||
ansible_wheel: wheel
|
||||
|
@ -17,3 +17,4 @@ num_cpus: 1
|
|||
|
||||
# extra args for virt-install
|
||||
virt_install_os_args: --cdrom https://www.foo.sh/ks/openbsd/openbsd.iso
|
||||
virt_install_python_cmd: pkg_add python3 -I -x
|
||||
|
|
|
@ -137,3 +137,10 @@
|
|||
with_items: "{{ hostkeys.stdout.splitlines() }}"
|
||||
delegate_to: localhost
|
||||
when: inventory_hostname not in result.list_vms
|
||||
|
||||
- name: install python if required
|
||||
command: "ssh {{ inventory_hostname }} '{{ virt_install_python_cmd }}'"
|
||||
delegate_to: localhost
|
||||
when:
|
||||
- inventory_hostname not in result.list_vms
|
||||
- virt_install_python_cmd is defined
|
||||
|
|
Loading…
Add table
Reference in a new issue