- name: Base server setup
  hosts: servers
  gather_facts: true
  become: false
  tasks:
    - name: Ping hosts
      ansible.builtin.ping:


    - name: Check expected LAN IP
      ansible.builtin.assert:
        that:
          - expected_lan_ip in ansible_all_ipv4_addresses
        fail_msg: "{{ inventory_hostname }} must have {{ expected_lan_ip }}; found: {{ ansible_all_ipv4_addresses | join(', ') }}"
        success_msg: "{{ inventory_hostname }} has {{ expected_lan_ip }}"
      when: expected_lan_ip is defined