From 668ff23ee6c9e6a1e55854452d3c5057fdbf96db Mon Sep 17 00:00:00 2001 From: Ruakij Date: Fri, 14 Apr 2023 09:42:46 +0200 Subject: [PATCH] Fix service task wrong usage --- kubernetes/tasks/install/agent/install_k3s.yml | 4 ++-- kubernetes/tasks/install/server/install_k3s.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kubernetes/tasks/install/agent/install_k3s.yml b/kubernetes/tasks/install/agent/install_k3s.yml index 87bd64b..e0e5728 100644 --- a/kubernetes/tasks/install/agent/install_k3s.yml +++ b/kubernetes/tasks/install/agent/install_k3s.yml @@ -8,6 +8,6 @@ - name: Restart when config changed, but install already done service: - name: k3s - status: restarted + name: k3s-agent + state: restarted when: "inventory_hostname != groups['kubernetes'][0] and not command.changed and config.changed" diff --git a/kubernetes/tasks/install/server/install_k3s.yml b/kubernetes/tasks/install/server/install_k3s.yml index 620b5f9..3cd0ccf 100644 --- a/kubernetes/tasks/install/server/install_k3s.yml +++ b/kubernetes/tasks/install/server/install_k3s.yml @@ -7,7 +7,7 @@ - name: Restart when config changed, but install already done service: name: k3s - status: restarted + state: restarted when: "inventory_hostname == groups['kubernetes'][0] and not command.changed and config.changed" - name: Waiting for K3s-server to accept connections @@ -29,7 +29,7 @@ - name: Restart when config changed, but install already done service: name: k3s - status: restarted + state: restarted when: "inventory_hostname != groups['kubernetes'][0] and not command.changed and config.changed" - name: Waiting for K3s-server to accept connections on other nodes