Created
February 12, 2014 12:29
-
-
Save danrough/8954719 to your computer and use it in GitHub Desktop.
A portion of a template used in one of our ansible playbooks to generate nagios hostgroup definitions file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define hostgroup { | |
hostgroup_name web_servers | |
alias Web servers | |
members {% for host in groups['web'] %}{{ hostvars[host]['ansible_ssh_host'] }}{% if not loop.last %}, {% endif %}{% endfor %} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment