Add initial config to support deployments on VMs
[kuberef.git] / playbooks / roles / bmra-config / templates / inventory.j2
1 {#
2 SPDX-FileCopyrightText: 2021 Anuket contributors
3
4 SPDX-License-Identifier: Apache-2.0
5 #}
6
7 [all]
8 {% for node in nodes %}
9 {{ 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 %}{{''}}
10 {% endfor %}
11 localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python2
12
13 {% for role in ['kube-master', 'etcd', 'kube-node'] %}
14 [{{ role }}]
15 {% for node in nodes %}
16 {% if role in idf.kubespray.nodes_roles[node.name] %}
17 {{ idf.kubespray.hostnames[node.name] }}
18 {% endif %}
19 {% endfor %}
20 {% endfor %}
21
22 [k8s-cluster:children]
23 kube-master
24 kube-node
25
26 [calico-rr]
27
28 {% if os_distro|lower != 'centos7' %}
29 [all:vars]
30 ansible_python_interpreter=/usr/bin/python3
31 {% endif %}