# /etc/exports # managed by Ansible {% for host in groups["servers"] %} {% set host = dict(hostvars[host]) %} /data/nfs/{{ host.ansible_host }} -maproot=root {{ host.ip.in if host.ip.in is defined }} {{ host.ip.out if host.ip.out is defined }} {% endfor %}