{% for host in groups['all'] %} object Host "{{ host }}" { /* Import the default host template defined in `templates.conf`. */ import "generic-host" /* Specify the address attributes for checks e.g. `ssh` or `http`. */ address = "{{ host }}" /* Set custom variable `os` for hostgroup assignment in `groups.conf`. */ vars.os = "Linux" } {% endfor %}