Closed SeanRiggs closed 1 year ago
Closing.. I ready change request in pull request. I WAS running ansible 2.10.8 and see not supported.
trouble shooting guide does spell this out. min of ansible v2.11 - upgraded on Ubuntu 22.04 installing ansible-core which takes you to v2.12 ... sorry for the spam!!!!!!
Had the same issue. Thanks for posting this! Maybe add a catch/fail in the playbooks for older version of ansible?
THAT'S a GREAT Idea!
On Tue, Jun 20, 2023 at 4:43 PM Sean Dion @.***> wrote:
Had the same issue. Thanks for posting this! Maybe add a catch/fail in the playbooks for older version of ansible?
— Reply to this email directly, view it on GitHub https://github.com/techno-tim/k3s-ansible/issues/317#issuecomment-1599672563, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2V5KXC33UEYENB2G42TDMLXMIRRFANCNFSM6AAAAAAZJZ5FMQ . You are receiving this because you modified the open/close state.Message ID: @.***>
great post in any case
Expected Behavior
When running the playbook we should get to this section and see a Changed or ok like this:
TASK [k3s/master : Init cluster inside the transient k3s-init service] ***** changed: [192.168.128.213] changed: [192.168.128.209] changed: [192.168.128.214]
Current Behavior
I get an error when getting to this section:
TASK [k3s/master : Init cluster inside the transient k3s-init service] ***** fatal: [192.168.128.214]: FAILED! => {"msg": "An unhandled exception occurred while templating '{% if groups['master'] | length > 1 %}\n {% if ansible_hostname == hostvars[groups['master'][0]]['ansible_hostname'] %}\n --cluster-init\n {% else %}\n --server https://{{ hostvars[groups['master'][0]].k3s_node_ip | split(\",\") | first | ansible.utils.ipwrap }}:6443\n {% endif %}\n --token {{ k3s_token }}\n{% endif %} {{ extra_server_args | default('') }}'. Error was a <class 'jinja2.exceptions.TemplateRuntimeError'>, original message: No filter named 'split' found."} fatal: [192.168.128.209]: FAILED! => {"msg": "An unhandled exception occurred while templating '{% if groups['master'] | length > 1 %}\n {% if ansible_hostname == hostvars[groups['master'][0]]['ansible_hostname'] %}\n --cluster-init\n {% else %}\n --server https://{{ hostvars[groups['master'][0]].k3s_node_ip | split(\",\") | first | ansible.utils.ipwrap }}:6443\n {% endif %}\n --token {{ k3s_token }}\n{% endif %} {{ extra_server_args | default('') }}'. Error was a <class 'jinja2.exceptions.TemplateRuntimeError'>, original message: No filter named 'split' found."} changed: [192.168.128.213]
Steps to Reproduce
Context (variables)
Operating system: Debian Bullseye arm64
Hardware: Raspberry Pi
Variables Used
all.yml
Hosts
host.ini
Possible Solution
original main.yml file found under roles/k3s/master changed to this:
This corrected the issue for me.
old server_init_args looked like this and did not work for me:
notice difference in the "split"