Created
July 1, 2018 08:24
-
-
Save freemanlutsk/904aebfbd24c39b1bc58c68528a6d6af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Create a kafka docker container | |
docker_container: | |
name: "kafka_docker" | |
image: wurstmeister/kafka:2.11-0.11.0.2 | |
detach: True | |
network_mode: host | |
#command: sh -c 'while sleep 3600; do :; done' | |
env: | |
KAFKA_BROKER_ID: 1 | |
KAFKA_ADVERTISED_LISTENERS: INSIDE://localhost:9092,OUTSIDE://kafka1-int-dev.xxx.com:9091 | |
KAFKA_CREATE_TOPICS: "click:1:1" | |
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true" | |
KAFKA_ZOOKEEPER_CONNECT: kafka1-int-dev.xxx.com:2181 | |
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT | |
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE | |
KAFKA_PORT: 9092 | |
KAFKA_ADVERTISED_PORT: 9091 | |
KAFKA_LISTENERS: INSIDE://:9092,OUTSIDE://:9091 | |
#volumes: | |
# - "/opt/kafka-log" | |
restart: yes | |
state: started | |
restart_policy: always | |
- name: Wait a few minutes for the IPs to be set to the container | |
wait_for: timeout=120 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment