ansible-role-rke2
ansible-role-rke2 copied to clipboard
bug: Always receive condition check error on `Create the RKE2 etcd snapshot dir`
Summary
When try to install rke2 cluster, receive error
i'm installing single server
[masters]
team-edge1-k8s
fatal: [team-edge1-k8s]: FAILED! => {"msg": "The conditional check 'rke2_etcd_snapshot_file and ( \"rke2-server.service\" is not in ansible_facts.services )' failed. The error was: template error while templating string: expected token ')', got '.'. String: {% if rke2_etcd_snapshot_file and ( \"rke2-server.service\" is not in ansible_facts.services ) %} True {% else %} False {% endif %}\n\nThe error appears to be in '/root/.ansible/roles/lablabs.rke2/tasks/first_server.yml': line 40, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n block:\n - name: Create the RKE2 etcd snapshot dir\n ^ here\n"}
Issue Type
Bug Report
Ansible Version
ansible [core 2.12.10]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
jinja version = 2.10.1
libyaml = True
Steps to Reproduce
- name: Deploy RKE2
hosts: all
become: yes
vars:
rke2_download_kubeconf: true
rke2_interface: ens160
rke2_version: v1.24.7+rke2r1
rke2_disable: rke2-ingress-nginx
rke2_airgap_mode: true
rke2_airgap_implementation: copy
rke2_artifact:
- sha256sum-{{ rke2_architecture }}.txt
- rke2.linux-{{ rke2_architecture }}.tar.gz
- rke2-images.linux-{{ rke2_architecture }}.tar.zst
rke2_custom_registry_mirrors:
- name: docker.io
endpoint:
- 'https://harbor.intent.ai'
rewrite: '"^rancher/(.*)": "harbor.int.ai/rancher/$1"'
roles:
- role: ansible-role-rke2
Expected Results
I expect clean installation but receive conditional check error
Actual Results
-edge1-k8s : ok=14 changed=4 unreachable=0 failed=1 skipped=14 rescued=0 ignored=0