请教下,执行 ansible-playbook start.yml 时报错,求解答~

ERROR MESSAGE SUMMARY **************************************************************************************************************************************************************************** [192.168.56.102]: Ansible FAILED! => playbook: start.yml; TASK: set_fact; message: {“msg”: "The conditional check ‘((existing_api_keys[‘json’] | selectattr(“name”, “equalto”, “grafana_apikey”)) | list) | length == 1’ failed. The error was: no test named ‘equalto’

The error appears to be in ‘/home/tidb/tidb-ansible/common_tasks/create_grafana_api_keys.yml’: line 24, column 3, but may be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  • set_fact: ^ here "}

原因: Check grafana API Key file existed failed

解决方法: sudo pip install --upgrade -r requirements.txt

:open_mouth:

看报错:no test named ‘equalto’

是jinja的版本过低,按requirements.txt安装包 即可

1赞