summaryrefslogtreecommitdiffstats
path: root/ansible/inventory/hosts.yml
blob: 825ee3b217375d3af7ff45fd0cb8519accb82db2 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
# This group contains hosts with all resources (binaries, packages, etc.)
# in tarball.
all:
  vars:
    # this key is supposed to be generated during setup.yml playbook execution
    # change it just when you have better one working for all nodes
    ansible_ssh_private_key_file: /root/.ssh/offline_ssh_key
    ansible_ssh_common_args: '-o StrictHostKeyChecking=no'

  children:
    resources:
      hosts:
        resource-host:
          ansible_host: 10.8.8.5

    # This is group of hosts where nexus, nginx, dns and all other required
    # services are running.
    infrastructure:
      hosts:
        infrastructure-server:
          ansible_host: 10.8.8.13
          #IP used for communication between infra and kubernetes nodes, must be specified.
          cluster_ip: 10.8.8.13

    # This is group of hosts which are/will be part of Kubernetes cluster.
    kubernetes:
      children:
        # This is a group of hosts containing kubernetes worker nodes.
        kubernetes-node:
          hosts:
            kubernetes-node-1:
              ansible_host: 10.8.8.19
              #ip of the node that it uses for communication with k8s cluster.
              cluster_ip: 10.8.8.19
              # External ip of the node, used for access from outside of the cluster.
              # Can be set to some kind of floating or public ip.
              # If not set, cluster_ip is used for this purpose.
              # external_ip: x.x.x.x

        # Group of hosts containing etcd cluster nodes.
        # Defaults to infra.
        kubernetes-etcd:
          hosts:
            infrastructure-server

        # This is a group of hosts that are to be used as kubernetes control plane nodes.
        # This means they host kubernetes api server, controller manager and scheduler.
        # This example uses infra for this purpose, however note that any
        # other host could be used including kubernetes nodes.
        # cluster_ip needs to be set for hosts used as control planes, external_ip can also be used.
        kubernetes-control-plane:
          hosts:
            infrastructure-server

    nfs-server:
      hosts:
        kubernetes-node-1