安塞布尔错误! “AnsibleUnicode”对象没有属性“keys”

安塞布尔错误! “AnsibleUnicode”对象没有属性“keys”

我第一次运行 Ansible 并收到此错误:

root@raspberrypi:/opt/ansible# ansible-playbook -i /opt/ansible/hosts simple.yml 
ERROR! 'AnsibleUnicode' object has no attribute 'keys'
/opt/ansible/hosts:1: Expected key=value host variable assignment, got: juniper

内容simple.yml

---
- name: Verifying NETCONF
  hosts: juniper
  tasks: 
    - name: Verifying NETCONF
      wait_for: host={{ansible_ssh_host}} port=22

内容hosts

juniper ansible_connection=local juniper ansible_port=22 ansible_host=172.16.0.1 juniper_user=root juniper_passwd=Juniper.2015

有什么建议么?

相关内容