-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinventory.tpl
More file actions
37 lines (27 loc) · 1.22 KB
/
inventory.tpl
File metadata and controls
37 lines (27 loc) · 1.22 KB
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
32
33
34
35
36
37
[bastion]
${address_bastion}
[masters]
%{ for master in master_nodes ~}
${master.access_ip_v4}
%{endfor ~}
[workers]
%{ for worker in worker_nodes ~}
${worker.access_ip_v4}
%{endfor ~}
%{if address_bastion == ""~}
[masters:vars]
ansible_ssh_common_args='-o StrictHostKeyChecking=no -o IdentityFile=./id_rsa -o UserKnownHostsFile=/dev/null'
[workers:vars]
ansible_ssh_common_args='-o StrictHostKeyChecking=no -o IdentityFile=./id_rsa -o UserKnownHostsFile=/dev/null'
%{endif~}
%{if address_bastion != ""~}
[masters:vars]
ansible_ssh_common_args='-o StrictHostKeyChecking=no -o IdentityFile=./id_rsa -o UserKnownHostsFile=/dev/null -o ProxyCommand="ssh -o IdentityFile=./id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -W %h:%p -q ${ssh_user}@${address_bastion}"'
[workers:vars]
ansible_ssh_common_args='-o StrictHostKeyChecking=no -o IdentityFile=./id_rsa -o UserKnownHostsFile=/dev/null -o ProxyCommand="ssh -o IdentityFile=./id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -W %h:%p -q ${ssh_user}@${address_bastion}"'
%{endif~}
[all:vars]
ansible_user="${ssh_user}"
ansible_python_interpreter=/usr/bin/python3
ansible_ssh_private_key_file=./id_rsa
ansible_ssh_extra_args='-o StrictHostKeyChecking=no'