create
This commit is contained in:
33
roles/influxdb/tasks/main.yml
Normal file
33
roles/influxdb/tasks/main.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
- name: "copy influxdb.rpm to destination server"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/"
|
||||
dest: /tmp
|
||||
|
||||
- name: "install influxdb"
|
||||
yum:
|
||||
name:
|
||||
- /tmp/influxdb-1.7.7.x86_64.rpm
|
||||
state: present
|
||||
|
||||
- name: "bak original influxdb.conf"
|
||||
shell: cd /etc/influxdb;mv influxdb.conf influxdb.conf_original
|
||||
|
||||
- name: "Templates influxdb.conf"
|
||||
template:
|
||||
src: "{{role_path}}/templates/influxdb.conf.j2"
|
||||
dest: /etc/influxdb/
|
||||
tags: template
|
||||
|
||||
- name: "Start influxdb"
|
||||
systemd:
|
||||
name: influxdb.service
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: "script set_influxdb_cluster.sh"
|
||||
script: "{{role_path}}//files/set_influxdb_cluster.sh"
|
||||
when: influxdb.cluster_agent is defined
|
||||
|
||||
- name: "script set_influxdb_blade00.sh"
|
||||
script: "{{role_path}}//files/set_influxdb_blade00.sh"
|
||||
|
||||
Reference in New Issue
Block a user