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

Allow for use of hostnames in advertised_kafka_api and other locations #65

Open
patrickangeles opened this issue Jun 29, 2022 · 1 comment

Comments

@patrickangeles
Copy link
Contributor

Presently, the ansible scripts work off a set of IP addresses to configure broker nodes. These IP addresses are used to identify listener bindings but also to come up with the list of seed brokers and advertised addresses. We should allow for the passing of hostnames to be used for advertised addresses and other things.

@freef4ll
Copy link

freef4ll commented Sep 5, 2022

It is also useful in Terraform to refer to the nodes via host name and export the availability zone and setting that in the config

templates/hosts_ini.tpl:

[redpanda]
%{ for i, ip in redpanda_public_ips ~}
${redpanda_public_dns[i]} ansible_host=${ ip } ansible_user=${ ssh_user } ansible_become=True private_ip=${redpanda_private_ips[i]} id=${i} zone=${redpanda_availability_zone[i]}
%{ endfor ~}

ansible/playbooks/start-redpanda.yml:

sudo rpk redpanda config set redpanda.rack {{ hostvars[inventory_hostname].zone }}

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