1、增加初始化运行环境配置文件的部署脚本
2、修改与运行环境相关的配置文件的template文件模板名字
This commit is contained in:
22
init_runtime/roles/telegraf_statistic/tasks/main.yml
Normal file
22
init_runtime/roles/telegraf_statistic/tasks/main.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
- name: "copy telegraf.rpm to destination server"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/telegraf-1.13.0-1.x86_64.rpm"
|
||||
dest: /tmp
|
||||
|
||||
- name: "install telegraf"
|
||||
yum:
|
||||
name:
|
||||
- /tmp/telegraf-1.13.0-1.x86_64.rpm
|
||||
state: present
|
||||
|
||||
- name: "Templates telegraf.conf"
|
||||
template:
|
||||
src: "{{role_path}}/templates/telegraf_statistic.conf.j2.j2"
|
||||
dest: /opt/tsg/init_runtime/roles/telegraf_statistic/templates/telegraf_statistic.conf.j2
|
||||
tags: template
|
||||
|
||||
- name: "copy telegraf_statistic.service to destination server"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/telegraf_statistic.service"
|
||||
dest: /usr/lib/systemd/system
|
||||
mode: 0644
|
||||
Reference in New Issue
Block a user