Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_fact: kafka_zookeeper_connection_string= wrong string #40

Open
noizo opened this issue May 25, 2018 · 1 comment
Open

set_fact: kafka_zookeeper_connection_string= wrong string #40

noizo opened this issue May 25, 2018 · 1 comment

Comments

@noizo
Copy link

noizo commented May 25, 2018

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?

@jaytaylor
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants