blob: 36bf3bd3064dbf6e2dbad5d9d261a6ce994e19b6 (
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
32
33
34
35
36
|
all:
vars:
ansible_ssh_private_key_file: /root/.ssh/id_rsa
ansible_ssh_common_args: "-o StrictHostKeyChecking=no"
children:
resources:
vars:
ansible_ssh_private_key_file: /root/.ssh/res.pem
ansible_user: "{{ hostvars[groups['resources'][0]].ansible_user }}"
ansible_become: "{{ hostvars[groups['resources'][0]].ansible_become }}"
hosts:
resource_host:
ansible_host: {{ resource_host }}
infrastructure:
hosts:
infra_host:
ansible_host: infra
cluster_ip: {{ hostvars['infra'].ansible_default_ipv4.address }}
kubernetes:
children:
kubernetes-node:
hosts:
{% for h in groups['nodes'] %}
{{ h }}:
ansible_host: "{{ hostvars[h].ansible_default_ipv4.address }}"
cluster_ip: "{{ hostvars[h].ansible_default_ipv4.address }}"
{% endfor %}
kubernetes-control-plane:
hosts:
infra_host
kubernetes-etcd:
hosts:
infra_host
nfs-server:
hosts:
node0
|