diff options
Diffstat (limited to 'playbooks/roles/bmra-config/templates/inventory.j2')
-rw-r--r-- | playbooks/roles/bmra-config/templates/inventory.j2 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/playbooks/roles/bmra-config/templates/inventory.j2 b/playbooks/roles/bmra-config/templates/inventory.j2 new file mode 100644 index 0000000..48e953c --- /dev/null +++ b/playbooks/roles/bmra-config/templates/inventory.j2 @@ -0,0 +1,23 @@ +[all] +{% for node in nodes %} +{{ idf.kubespray.hostnames[node.name] }} ansible_host={{ node.interfaces[idf.net_config[engine.pxe_network].interface].address }} ip={{ node.interfaces[idf.net_config[engine.pxe_network].interface].address }} +{% endfor %} +localhost + +{% for role in ['kube-master', 'etcd', 'kube-node'] %} +[{{ role }}] +{% for node in nodes %} +{% if role in idf.kubespray.nodes_roles[node.name] %} +{{ idf.kubespray.hostnames[node.name] }} +{% endif %} +{% endfor %} +{% endfor %} + +[k8s-cluster:children] +kube-master +kube-node + +[calico-rr] + +[all:vars] +ansible_python_interpreter=/usr/bin/python3 |