Skip to content

Commit

Permalink
Fix build for ansible-role-kafka (#12)
Browse files Browse the repository at this point in the history
* Upgrade to latest version of Ansible role for zookeeper
* Fix Apache mirror URL
* ubuntu-16.04 is no longer available as a standard image at Hetzner (and thus Travis)
* Lowercase the value and remove the quotes for kafka_enable_topic_deletion
* Define required variables to make things work
  • Loading branch information
Bart Cortooms authored Oct 7, 2021
1 parent 27c770b commit 798a7ec
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ env:
matrix:
- MOLECULE_PLATFORM: debian-9
- MOLECULE_PLATFORM: debian-10
- MOLECULE_PLATFORM: ubuntu-16.04
- MOLECULE_PLATFORM: ubuntu-18.04
- MOLECULE_PLATFORM: ubuntu-20.04

before_script:
- wget https://raw.githubusercontent.com/nl2go/docker-molecule/3.0.4-n2g-1.0.0/docker-compose.yml
Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
kafka_apache_mirror_base_url: https://mirror.netcologne.de/apache.org
kafka_apache_mirror_base_url: https://archive.apache.org/dist
kafka_enable_topic_deletion: true
kafka_user: kafka
kafka_group: kafka
Expand Down
9 changes: 6 additions & 3 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ provisioner:
kafka_jmx_host: localhost
kafka_jmx_username: jmx
kafka_jmx_password: molecule
kafka_listener_security_protocol_map: "SASL_PLAINTEXT:SASL_PLAINTEXT,REPLICATION:SASL_PLAINTEXT"
kafka_listeners: "SASL_PLAINTEXT://{{ kafka_host }}:9092,REPLICATION://{{ kafka_host }}:9093"
kafka_inter_broker_listener_name: "REPLICATION"
host_vars:
"${MOLECULE_TEST_SCOPE:-default}-kfk-1":
kafka_broker_id: 1
Expand All @@ -64,11 +67,11 @@ provisioner:
"${MOLECULE_TEST_SCOPE:-default}-kfk-3":
kafka_broker_id: 3
"${MOLECULE_TEST_SCOPE:-default}-zk-1":
zookeeper_member_id: 1
zookeeper_member_id: "{{ ansible_default_ipv4.address }}"
"${MOLECULE_TEST_SCOPE:-default}-zk-2":
zookeeper_member_id: 2
zookeeper_member_id: "{{ ansible_default_ipv4.address }}"
"${MOLECULE_TEST_SCOPE:-default}-zk-3":
zookeeper_member_id: 3
zookeeper_member_id: "{{ ansible_default_ipv4.address }}"
lint: |
set -e
ansible-lint
Expand Down
2 changes: 1 addition & 1 deletion molecule/resources/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
version: 1.0.0

- src: nl2go.zookeeper
version: 1.0.0
version: 1.1.2
2 changes: 1 addition & 1 deletion templates/server.properties.j2
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ advertised.listeners={{ kafka_advertised_listeners }}
# when a topic is deleted it stay in a pending state forever. When set to true the topic
# is immediately deleted when the delete action is trigered.
{% if kafka_enable_topic_deletion is defined %}
delete.topic.enable="{{ kafka_enable_topic_deletion }}"
delete.topic.enable={{ kafka_enable_topic_deletion | lower }}
{% endif %}

# Maps listener names to security protocols, the default is for them to be the same. See the config documentation for more details
Expand Down

0 comments on commit 798a7ec

Please sign in to comment.