k3s-io / k3s-ansible

Apache License 2.0
1.99k stars 799 forks source link

Unexpected templating type error on CentOS 8 RPI4 #73

Closed tnxgalaxy closed 10 months ago

tnxgalaxy commented 4 years ago

Unexpected templating type error on CentOS 8 RPI4

Error message:

TASK [raspbian : Test for Raspbian] **********************************************************************************************************************************************
Monday 03 August 2020  19:14:42 +0100 (0:00:00.216)       0:00:28.536 ********* 
fatal: [polux]: FAILED! => {"msg": "Unexpected templating type error occurred on ({% if ( ansible_facts.architecture is search(\"arm\") and ansible_facts.lsb.description is match(\"[Rr]aspbian.*[Bb]uster\") ) or ( ansible_facts.architecture is search(\"aarch64\") and ansible_facts.lsb.description is match(\"Debian.*buster\") ) %}True{% else %}False{% endif %}): expected string or bytes-like object"}
fatal: [pangea]: FAILED! => {"msg": "Unexpected templating type error occurred on ({% if ( ansible_facts.architecture is search(\"arm\") and ansible_facts.lsb.description is match(\"[Rr]aspbian.*[Bb]uster\") ) or ( ansible_facts.architecture is search(\"aarch64\") and ansible_facts.lsb.description is match(\"Debian.*buster\") ) %}True{% else %}False{% endif %}): expected string or bytes-like object"}
    to retry, use: --limit @/home/ansible/work/k3s-ansible/site.retry

Machine: Raspberry Pi 4, 4GB model.

OS:

$ uname -a
Linux polux 5.4.53-v8.1.el8 #1 SMP PREEMPT Sun Jul 26 12:06:25 -03 2020 aarch64 aarch64 aarch64 GNU/Linux
$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
tnxgalaxy commented 4 years ago

This could be the same issue as bugs #62 and #68

As a proof, a quick and dirty renaming of the roles/raspbian/tasks/main.yml file allows to pass that point