Add tasks to set Python interpreter and install netaddr in controller environment
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user