define host { use linux-server host_name {{ inventory_hostname_short }} address {{ inventory_hostname }} hostgroups {% if parent_host is not defined %}linux-servers,{% endif %}{{ ansible_distribution | lower }}-hosts{% if group_names | length > 0 %},{{ group_names | join(",") }}{% endif %}{% if nagios_extra_groups | length > 0 %},{{ nagios_extra_groups | join(",") }}{% endif %} {% if mydomain is defined and mydomain != "ra.nemunai.re" -%} {% set dn = mydomain.split('.') %} parents {{ dn[0] }} {%- endif %} }