--- # Task file influxdb/database.yml for the monitoring role # Infrastructure # Ansible instructions to deploy the infrastructure # Copyright (C) 2019-2020 Christoph (Sheogorath) Kern # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . - name: Create database community.general.influxdb_database: state: present login_username: "{{ monitoring_influxdb_admin_username }}" login_password: "{{ monitoring_influxdb_admin_password }}" hostname: "{{ monitoring_influxdb_domain }}" port: 443 ssl: true validate_certs: true database_name: "{{ database.name }}" delegate_to: 127.0.0.1 no_log: true - name: Create retention policies community.general.influxdb_retention_policy: login_username: "{{ monitoring_influxdb_admin_username }}" login_password: "{{ monitoring_influxdb_admin_password }}" hostname: "{{ monitoring_influxdb_domain }}" port: 443 ssl: true validate_certs: true database_name: "{{ database.name }}" policy_name: "{{ policy.name }}" duration: "{{ policy.duration }}" replication: "{{ policy.replication }}" default: "{{ policy.default | default(omit) }}" loop: "{{ database.policies }}" loop_control: loop_var: "policy" delegate_to: 127.0.0.1