Skip to content

Instantly share code, notes, and snippets.

@kevduggan
Last active January 14, 2016 12:38
Show Gist options
  • Save kevduggan/cf138151fdb74a48bfb3 to your computer and use it in GitHub Desktop.
Save kevduggan/cf138151fdb74a48bfb3 to your computer and use it in GitHub Desktop.
example of a group vars file for provisioning a zookeeper host where the GROUP_TAG fact is populate by a generated zookeeper_servier_id
# must be between 1 and 255
ZOOKEEPER_SERVER_ID: "{% set zk_id = groups['zookeeper'].index(inventory_hostname)+1 %}{{ zk_id }}"
ZK_PORT: 2181
# must have preceeding comma as it is being appended onto the tags list!!
GROUP_TAGS: ",'zookeeper_server_id': {{ ZOOKEEPER_SERVER_ID }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment