From 42f63faf5245f7f5cc768a15ca7b02ad532a1bd6 Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 2 Dec 2025 19:47:00 +0100 Subject: [PATCH] Add tasks to set Python interpreter and install netaddr in controller environment --- tasks/preflight-checks.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tasks/preflight-checks.yml b/tasks/preflight-checks.yml index 6d3d72c..eb3e23d 100644 --- a/tasks/preflight-checks.yml +++ b/tasks/preflight-checks.yml @@ -1,6 +1,21 @@ --- # preflight-checks.yml - Validate environment before running main tasks +- name: "Get Ansible python interpreter" + ansible.builtin.set_fact: + controller_python: "{{ ansible_playbook_python }}" + delegate_to: localhost + +- name: "Install netaddr in controller Python environment" + ansible.builtin.pip: + name: netaddr + state: present + executable: "{{ controller_python | dirname }}/pip" + delegate_to: localhost + run_once: true + + + - name: "[PREFLIGHT] Check if running on Proxmox host" ansible.builtin.stat: path: "/etc/pve/nodes"