Last active
November 9, 2022 15:59
-
-
Save wwalker/39e1f6437c3b9f17bf15d23cf5564dc7 to your computer and use it in GitHub Desktop.
dynamic host inventory generation
This file contains hidden or 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
--- | |
masters: | |
hosts: | |
es-master-{{ cluster_name }}-00{1..{{ master.count }}}: {} | |
hot-nodes: | |
hosts: | |
es-hot-{{ cluster_name }}-00{1..{{ hot.count }}}: {} | |
warm-nodes: | |
hosts: | |
es-warm-{{ cluster_name }}-00{1..{{ warm.count }}}: {} | |
coord-nodes: | |
hosts: | |
es-coord-{{ cluster_name }}-00{1..{{ coord.count }}}: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to do something like inventory.yml and have it generate the list of hosts.
Is there a shortcut, or should I just use jinja2?