- hosts: all  
  tasks:
   - name: Copy Package
     copy: src=/usr/local/filebeat-6.2.2-linux-x86_64.tar.gz dest=/usr/local/filebeat-6.2.2-linux-x86_64.tar.gz
   - name: Tar Package
     shell: cd /usr/local/;tar zxvf filebeat-6.2.2-linux-x86_64.tar.gz
   - name: Rename Directory
     shell: mv /usr/local/filebeat-6.2.2-linux-x86_64 /usr/local/filebeat
   - name: Copy Profile
     copy: src=/usr/local/kafka.yml dest=/usr/local/filebeat/kafka.yml
   - name: Add rc.local
     shell: echo 'nohup /usr/local/filebeat/filebeat -e -c /usr/local/filebeat/kafka.yml >/dev/null 2>&1 &' >> /etc/rc.local
   - name: Start Service
     shell: nohup /usr/local/filebeat/filebeat -e -c /usr/local/filebeat/kafka.yml >/dev/null 2>&1 &

 

相关文章:

  • 2021-06-20
  • 2022-12-23
  • 2021-07-05
  • 2021-07-13
  • 2022-01-22
  • 2021-07-09
猜你喜欢
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2021-06-20
相关资源
相似解决方案