From 2d8cc987f8197f7dd9d74fd5d7f9c76a6a70c95e Mon Sep 17 00:00:00 2001 From: djpbessems Date: Wed, 20 Apr 2022 12:46:21 +0200 Subject: [PATCH] Avoid using delegate_to since it requires DNS in place --- playbook.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/playbook.yml b/playbook.yml index 5e2b104..f9ce187 100644 --- a/playbook.yml +++ b/playbook.yml @@ -109,8 +109,7 @@ ansible.builtin.slurp: src: /var/lib/rancher/k3s/server/token register: k3s_token - run_once: true - delegate_to: ansible_play_hosts[0] + when: inventory_hostname == ansible_play_hosts[0] - name: Install K3s binary (additional nodes) ansible.builtin.shell: