0

I am running Ansible for the first time and I get this error:

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

Content of simple.yml:

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

Content of hosts:

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

Any suggestions?

  • 1
    Take out the juniper before and after the ansible_connection=local – ryekayo Sep 28 '16 at 13:59
  • Thanks! Needed to remove only the second juniper statment! – Federi Sep 28 '16 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.