Closed jingzhiz-devops closed 1 year ago
比如: 1、 fatal: [localhost]: FAILED! => {"msg": "template error while templating string: no filter named 'next_nth_usable'. String: IP:{{ kubernetes.serviceSubnet | next_nth_usable(1) }}"}
2、 fatal: [10.1.1.193]: FAILED! => {"msg": "The conditional check 'kubernetes.podSubnet | ipaddr(kubernetes.serviceSubnet) | string == 'None'' failed. The error was: template error while templating string: no filter named 'ipaddr'. String: {% if kubernetes.podSubnet | ipaddr(kubernetes.serviceSubnet) | string == 'None' %} True {% else %} False {% endif %}"}
3、 TASK [verify : Check that podSubnet is a network range] ** fatal: [10.1.1.193]: FAILED! => {"msg": "The conditional check 'kubernetes.podSubnet | ipaddr('net')' failed. The error was: template error while templating string: no filter named 'ipaddr'. String: {% if kubernetes.podSubnet | ipaddr('net') %} True {% else %} False {% endif %}"}
这是执行的时候校验配置出错,检查一下group_vars/all.yml 中的配置。同时确认netaddr是否安装成功
比如: 1、 fatal: [localhost]: FAILED! => {"msg": "template error while templating string: no filter named 'next_nth_usable'. String: IP:{{ kubernetes.serviceSubnet | next_nth_usable(1) }}"}
2、 fatal: [10.1.1.193]: FAILED! => {"msg": "The conditional check 'kubernetes.podSubnet | ipaddr(kubernetes.serviceSubnet) | string == 'None'' failed. The error was: template error while templating string: no filter named 'ipaddr'. String: {% if kubernetes.podSubnet | ipaddr(kubernetes.serviceSubnet) | string == 'None' %} True {% else %} False {% endif %}"}
3、 TASK [verify : Check that podSubnet is a network range] ** fatal: [10.1.1.193]: FAILED! => {"msg": "The conditional check 'kubernetes.podSubnet | ipaddr('net')' failed. The error was: template error while templating string: no filter named 'ipaddr'. String: {% if kubernetes.podSubnet | ipaddr('net') %} True {% else %} False {% endif %}"}