diff --git a/tasks/preflight-checks.yml b/tasks/preflight-checks.yml index e31d835..6d3d72c 100644 --- a/tasks/preflight-checks.yml +++ b/tasks/preflight-checks.yml @@ -91,7 +91,7 @@ - name: "[PREFLIGHT] Validate IP address format for clones" ansible.builtin.assert: that: - - "item.ip | ipaddr" + - "item.ip | ansible.utils.ipaddr" fail_msg: "Invalid IP address for clone {{ item.id }}: {{ item.ip }}" loop: "{{ clones }}" when: create_clones | default(false) @@ -99,20 +99,20 @@ - name: "[PREFLIGHT] Validate static IP address format (if not DHCP)" ansible.builtin.assert: that: - - "ip_address | ipaddr" + - "ip_address | ansible.utils.ipaddr" fail_msg: "Invalid static IP address: {{ ip_address }}" when: ip_mode == 'static' - name: "[PREFLIGHT] Validate gateway IP address" ansible.builtin.assert: that: - - "gateway | ipaddr" + - "gateway | ansible.utils.ipaddr" fail_msg: "Invalid gateway IP address: {{ gateway }}" - name: "[PREFLIGHT] Validate DNS servers" ansible.builtin.assert: that: - - "item | ipaddr" + - "item | ansible.utils.ipaddr" fail_msg: "Invalid DNS server IP: {{ item }}" loop: "{{ dns }}" when: dns is defined and dns | length > 0