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.
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.