ansible-kafka
ansible-kafka copied to clipboard
set_fact: kafka_zookeeper_connection_string= wrong string
Hi. Thanks for perfect role, like it a lot, however:
This is my playbook:
- hosts: kafka
vars:
zookeeper_hosts: 172.31.32.93
kafka_zookeeper_hosts:
- 172.31.32.93
kafka_hosts:
- 172.31.46.135
- 172.31.47.248
roles:
- {role: ansible_kafka ,kafka_hosts: "{{ groups.kafka | list }}", kafka_zookeeper_hosts: "{{ zookeeper_hosts | list }}", kafka_version: "0.11.0.2", kafka_scala_serverion: "2.10" }
There is a line in kafka-cfg.yml
which suppose to create zookeeper connection string.
set_fact: kafka_zookeeper_connection_string="{{ kafka_zookeeper_hosts | join(':' ~ kafka_zookeeper_port ~ ',') }}:{{ kafka_zookeeper_port }}"
Instead of creating string like 172.31.32.93:2181
it creates something like
1:2181,7:2181,2:2181,.:2181,3:2181,1:2181,.:2181,3:2181,2:2181,.:2181,9:2181,3:2181
Could You please suggest a fix?
Hi @noizo,
Can you share the kafka_zookeeper_hosts
value being used?
It can be printed out by adding a debug task right before the set_fact task.