Skip to content

Instantly share code, notes, and snippets.

@nithyadurai87
Created November 23, 2020 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nithyadurai87/1bb70558e7d0abab912aaf945b4c03d8 to your computer and use it in GitHub Desktop.
Save nithyadurai87/1bb70558e7d0abab912aaf945b4c03d8 to your computer and use it in GitHub Desktop.
- 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