PyratLabs / ansible-role-k3s

Ansible role for installing k3s as either a standalone server or HA cluster.
BSD 3-Clause "New" or "Revised" License
640 stars 135 forks source link

Fix check for k3s_token_location #188

Closed niklasweimann closed 2 years ago

niklasweimann commented 2 years ago

Fix check for k3s_token_location

Summary

This PR fixes the check for adding the token to the k3s service file. Bug description in #187

Issue type

crutonjohn commented 2 years ago

hmmm...looks like the debian HA is failing because it's trying to download an EPEL package. lol.

crutonjohn commented 2 years ago

@xanmanning it looks like we're already in a conditional that is only for k3s_control_node here. is there any reason for the logic to previously have been {% if k3s_control_node and not k3s_primary_control_node %} for the statement in question to begin with?

xanmanning commented 2 years ago

@xanmanning it looks like we're already in a conditional that is only for k3s_control_node here. is there any reason for the logic to previously have been {% if k3s_control_node and not k3s_primary_control_node %} for the statement in question to begin with?

I suspect this will have been a lapse in concentration, this condition probably just needs to be {% if not k3s_primary_control_node or k3s_token_location %}

xanmanning commented 2 years ago

hmmm...looks like the debian HA is failing because it's trying to download an EPEL package. lol.

The HAProxy node in the molecule test is RHEL family (CentOS/RockyLinux)

xanmanning commented 2 years ago

Re-running test as the repo might have been down?

xanmanning commented 2 years ago

Looks like cluster creation hangs when k3s_token_location is undefined.

xanmanning commented 2 years ago

@niklasweimann - do you want to give the branch on #190 a go to check it still works?