pingcap/tidb-ansible

运行ansible-playbook bootstrap.yml时报错The error was: 'ansible_inventory_sources' is undefined

roger-gs opened this issue · 1 comments

报错信息如下:
TASK [check_config_static : Check inventory configuration] ************************************************************************
fatal: [localhost]: FAILED! =>
msg: |-
The task includes an option with an undefined variable. The error was: 'ansible_inventory_sources' is undefined

The error appears to have been in '/home/tidb/tidb-ansible/roles/check_config_static/tasks/main.yml': line 84, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Check inventory configuration
  ^ here

exception type: <class 'ansible.errors.AnsibleUndefinedVariable'>
exception: 'ansible_inventory_sources' is undefined
to retry, use: --limit @/home/tidb/tidb-ansible/retry_files/bootstrap.retry

PLAY RECAP ************************************************************************************************************************
localhost : ok=8 changed=5 unreachable=0 failed=1

ERROR MESSAGE SUMMARY *************************************************************************************************************
[localhost]: Ansible Failed! ==>

msg: |-
The task includes an option with an undefined variable. The error was: 'ansible_inventory_sources' is undefined

The error appears to have been in '/home/tidb/tidb-ansible/roles/check_config_static/tasks/main.yml': line 84, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Check inventory configuration
  ^ here

exception type: <class 'ansible.errors.AnsibleUndefinedVariable'>
exception: 'ansible_inventory_sources' is undefined

Please post ansible version, suspected ansible version is wrong.