blob: 1ab35f5f0cd07eceff20f2b42b768b4e97710006 [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
- name: "download influxdb rpm"
get_url:
args:
url: https://influxdb.s3.amazonaws.com/{{ influxdb_rpm }}
dest: /tmp/{{ influxdb_rpm }}
checksum: "{{ influxdb_checksum }}"
force: no
- name: "ensure influxdb is installed"
yum: name=/tmp/{{ influxdb_rpm }} state=present
- name: "configure influxdb"
template: src=influxdb-9.4.2.conf dest=/etc/opt/influxdb/influxdb.conf
notify:
- restart influxdb
- setup influxdb
- name: "download fluo setup"
get_url: url=https://raw.githubusercontent.com/apache/fluo/main/contrib/influxdb/fluo_metrics_setup.txt dest=/etc/opt/influxdb/fluo_metrics_setup.txt
- name: "create data dir"
file: path={{ default_data_dirs[0] }}/influxdb state=directory owner=influxdb group=influxdb
- name: "ensure influxdb is running (and enable it at boot)"
service: name=influxdb state=started enabled=yes
notify:
- setup influxdb