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"