jaytaylor / ansible-kafka

Ansible Kafka role
https://galaxy.ansible.com/jaytaylor/kafka/
Other
67 stars 52 forks source link

'dict object' has no attribute 'port' #45

Closed ahshanmd closed 5 years ago

ahshanmd commented 5 years ago

i'm trying to run the ansible-kafka playbook clone from the github repo and happen to be receiving below 'dict object' has no attribute 'por

playbook.yml

---

- hosts: dev

  roles:
   - ansible-kafka

  vars:
    zookeeper_hosts: "kafka-d1:2181,kafka-d2:2181,kafka-d3:2181"
    kafka_zookeeper_hosts: [ 'kafka-d1','kafka-d2','kafka-d3' ]
    kafka_zookeeper_port: 2181
    kafka_hosts:
      - dev
    kafka_healthcheck_address: "kafka-d1:2181,kafka-d2:2181,kafka-d3:2181/kafka"
    kafka_server_port: 9092
    kafka_connection_string: [ 'kafka-d1','kafka-d2','kafka-d3' ]

TASK [ansible-kafka : Generate the kafka hosts connection string] **** fatal: [kafka-d1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'port'\n\nThe error appears to have been in '/home/ahshan.md/ansible/ansible-kafka/tasks/kafka-cfg.yml': line 31, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears

ahshanmd commented 5 years ago

i had made an mistake in commenting out the host variable under defaults, thus leading to the above issue

issue is resolved , hence closing