summaryrefslogtreecommitdiffstats
path: root/playbooks/roles/bmra-config/templates/inventory.j2
blob: 9b91c5f4e5288feaea00ca23e458a3c361069811 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{#
SPDX-FileCopyrightText: 2021 Anuket contributors

SPDX-License-Identifier: Apache-2.0
#}

[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 ansible_connection=local ansible_python_interpreter=/usr/bin/python2

{% 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]

{% if os_distro|lower != 'centos7' %}
[all:vars]
ansible_python_interpreter=/usr/bin/python3
{% endif %}