herzogf / homek8s

Kubernetes installer for your datacenter at home.
MIT License
1 stars 2 forks source link

ansible: optimize preseed of gateway /etc/hosts file #66

Open herzogf opened 4 years ago

herzogf commented 4 years ago

Right now we're using an ansible loop with lineinfile to preseed the /etc/hosts file on the gateway with all possible node hostnames, by default from k8s-node-100 to k8s-node-200. This is awfully slow :-( Every lineinfile run does a full "login - become - python lineinfile" cycle on the gateway.

Thus we need to optimize this step in the ansible gateway role, e.g. by using a custom shell script to do the preseed as one task/step.