Skip to content

Host File

Host file that will store all your remote machines.

All groups machine in file host

  • masters: That group will be run on control plane nodes in cluster.
  • workers: That group will be run on worker nodes in cluster.
  • remove_nodes: That group will be run on remove nodes in cluster.
  • proxys: That group will be run on HA proxy nodes in cluster.
  • nfs: That group will be run on nfs nodes in cluster.
  • waf: That group will be run on waf nodes in cluster.

Add SSH information to host

[all:vars]
ansible_connection=ssh
ansible_user=<ssh user>
ansible_ssh_private_key_file=<your ssh key>
ansible_password=<ssh password>

Use case

Single mode
[masters]
master ansible_host=<machine host>
Cluster mode
[masters]
master ansible_host=<machine host>
[workers]
worker1 ansible_host=<machine host>
worker2 ansible_host=<machine host>
Production mode
[proxys]
proxy ansible_host=<machine host>
[masters]
master1 ansible_host=<machine host>
master2 ansible_host=<machine host>
master3 ansible_host=<machine host>
[workers]
worker1 ansible_host=<machine host>
worker2 ansible_host=<machine host>
Remove node from cluster
[remove_nodes]
node ansible_host=<machine host>
Safeline WAF server
[waf]
waf ansible_host=<machine host>
NFS server
[nfs]
nfs ansible_host=<machine host>