ansible_telegraf
2020-11-02 09:50:31 0 举报
anible部署telegraf应用流程案例
作者其他创作
大纲/内容
service restart
yum telegraf.rpm
cp telegraf.rpm
template: src=telegraf-template.conf.j2 dest=/etc/telegraf/telegraf.conf backup=yes mode='0644' notify: restart telegraf
ping
mkdir
name=/home/telegraf_image/telegraf-1.9.0-1.x86_64.rpm state=present
service started
handlersname=telegraf state=restarted
ps -aux|grep telegrafresult.stdout.find('telegraf.conf')!=-1
template telegraf.conf(backup)
path=/home/telegraf_image state=directory mode='0755'
inventory.py
file
判断telegraf是否安装
src=/home/yqt/telegraf-1.9.0-1.x86_64.rpm dest=/home/telegraf_image/ mode='0755'
path=/home/telegraf_image/telegraf-1.9.0-1.x86_64.rpm state=absent path=/home/telegraf_image state=absent
hosts
user:ansible
name=telegraf state=started
0 条评论
下一页