Skip to content

Instantly share code, notes, and snippets.

@cjmatta
Created June 26, 2018 19:16
Show Gist options
  • Save cjmatta/d6ce6b846aecf12f1f99746a586f3bee to your computer and use it in GitHub Desktop.
Save cjmatta/d6ce6b846aecf12f1f99746a586f3bee to your computer and use it in GitHub Desktop.
Ansible playbook to provision /var/lib/kafka
---
- hosts: broker
tasks:
- name: create filesystem
filesystem:
fstype: ext4
dev: /dev/xvdf
- name: create /var/lib/kafka directory
file:
path: /var/lib/kafka
owner: cp-kafka
group: confluent
state: directory
- name: mount /var/lib/kafka
mount:
path: /var/lib/kafka
src: /dev/xvdf
boot: yes
opts: defaults,noatime,discard
state: mounted
fstype: ext4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment