Created
November 23, 2020 18:01
-
-
Save nithyadurai87/1bb70558e7d0abab912aaf945b4c03d8 to your computer and use it in GitHub Desktop.
This file contains 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
- hosts: all | |
become: true | |
tasks: | |
- name: create directory | |
file: state=directory path=kafka_test | |
file: state=directory path=/opt/kafka_test | |
- name: delete directory | |
file: state=absent path=kafka_test | |
- name: Download kafka | |
get_url: | |
url: https://downloads.apache.org/kafka/2.5.0/kafka_2.12-2.5.0.tgz | |
dest: /opt/kafka_test/ | |
- name: Extract archive | |
unarchive: | |
src: /opt/kafka_test/kafka_2.12-2.5.0.tgz | |
dest: /opt/kafka_test | |
remote_src: yes | |
- name: Edit config file | |
lineinfile: | |
path: /opt/kafka_test/kafka_2.12-2.5.0/config/server.properties | |
line: listeners=PLAINTEXT://localhost:9092 | |
insertbefore: BOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment