Add tasks to set Python interpreter and install netaddr in controller environment

This commit is contained in:
2025-12-02 19:47:00 +01:00
parent b30159295a
commit 42f63faf52

View File

@@ -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"