专栏名称: 院长技术
《院长技术》专注于DevOps技术栈研究,云原生、Istio,CICD、Docker、Prometheus、K8s、ServiceMesh、Jenkins、Linux、微服务、分布式存储、监控、日志收集、安全渗透、虚拟化等技术栈。
今天看啥  ›  专栏  ›  院长技术

ansible-playbook剧本安装单机kafka和zookeeper

院长技术  · 公众号  ·  · 2024-11-03 23:09
    

文章预览

--- - name: Install Kafka and Zookeeper on single node   hosts: localhost   become: true   tasks:     - name: Install Java (if not already installed)       apt:         name: default-jre         state: present     - name: Download and extract Kafka       unarchive:         src: https://downloads.apache.org/kafka/3.5.0/kafka_2.13-3.5.0.tgz         dest: /opt/         remote_src: yes         creates: /opt/kafka_2.13-3.5.0     - name: Download and extract Zookeeper       unarchive:         src: https://downloads.apache.org/zookeeper/zookeeper-3.8.1/apache-zookeeper-3.8.1-bin.tar.gz         dest: /opt/         remote_src: yes         creates: /opt/apache-zookeeper-3.8.1-bin     - name: Set up Kafka environment variables       lineinfile:         path: /etc/profile         line: "export KAFKA_HOME=/opt/kafka_2.13-3.5.0"         create: yes     - name: Set up Zookeeper environment variables       lineinfile:   ………………………………

原文地址:访问原文地址
快照地址: 访问文章快照
总结与预览地址:访问总结与预览