当我运行 ansible-playbook
命令时,出现以下错误:
ERROR! unexpected parameter type in action: <class 'bool'>
The error appears to be in '/Users/mycomputer/.ansible/roles/wtanaka.jq/tasks/compat_sudo.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
---
- name: install python-apt on ansible < 1.6.0 and ubuntu et al
^ here
我看了看那个 playbook,我没有看到任何突出我的东西:
---
- name: install python-apt on ansible < 1.6.0 and ubuntu et al
sudo: yes
Ansible 版本:
ansible 2.10.7
config file = /Users/mycomputer/Tools/xeno-ansible/ansible.cfg
configured module search path = ['/Users/mycomputer/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/homebrew/Cellar/ansible/3.1.0/libexec/lib/python3.9/site-packages/ansible
executable location = /opt/homebrew/bin/ansible
python version = 3.9.2 (default, Mar 26 2021, 15:28:17) [Clang 12.0.0 (clang-1200.0.32.29)]
这会是 Ansible 和我的 M1 Mac 的问题还是剧本中的某些内容有问题?