summaryrefslogtreecommitdiffstats
path: root/playbooks/roles/bmra-config/templates/inventory.j2
blob: f22aa56b1db04d343af8448103b9a324c1832056 (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 }} {% if vendor|lower == 'libvirt-vms' %} ansible_user=root {% endif %}{{''}}
{% 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 %}