Create registries.yaml only if k3s_registries.mirrors or k3s_registries.configs are not empty

This commit is contained in:
matteyeux 2023-06-01 14:34:17 +02:00
parent 44635027ce
commit cc64737bdc

View file

@ -31,7 +31,7 @@
- name: Ensure containerd registries
ansible.builtin.include_tasks: ensure_containerd_registries.yml
when:
- k3s_registries is defined
- (k3s_registries.mirrors | default(None)) != None or (k3s_registries.configs | default(None) != None)
- ('rootless' not in k3s_runtime_config or not k3s_runtime_config.rootless)
- name: Run cluster pre-checks