Code Review
/
kuberef.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add initial config to support deployments on VMs
[kuberef.git]
/
playbooks
/
roles
/
bmra-config
/
templates
/
inventory.j2
diff --git
a/playbooks/roles/bmra-config/templates/inventory.j2
b/playbooks/roles/bmra-config/templates/inventory.j2
index
48e953c
..
f22aa56
100644
(file)
--- a/
playbooks/roles/bmra-config/templates/inventory.j2
+++ b/
playbooks/roles/bmra-config/templates/inventory.j2
@@
-1,8
+1,14
@@
+{#
+SPDX-FileCopyrightText: 2021 Anuket contributors
+
+SPDX-License-Identifier: Apache-2.0
+#}
+
[all]
{% for node in nodes %}
[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 }}
+{{ 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 %}
{% endfor %}
-localhost
+localhost
ansible_connection=local ansible_python_interpreter=/usr/bin/python2
{% for role in ['kube-master', 'etcd', 'kube-node'] %}
[{{ role }}]
{% for role in ['kube-master', 'etcd', 'kube-node'] %}
[{{ role }}]
@@
-19,5
+25,7
@@
kube-node
[calico-rr]
[calico-rr]
+{% if os_distro|lower != 'centos7' %}
[all:vars]
ansible_python_interpreter=/usr/bin/python3
[all:vars]
ansible_python_interpreter=/usr/bin/python3
+{% endif %}