--- # Task file influxdb/main.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 admin user community.general.influxdb_user: 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 user_name: "{{ monitoring_influxdb_admin_username }}" user_password: "{{ monitoring_influxdb_admin_password }}" admin: true delegate_to: 127.0.0.1 no_log: true - name: Configure databases include_tasks: database.yml loop: "{{ monitoring_influxdb_databases }}" loop_control: loop_var: "database" - name: Create database user community.general.influxdb_user: 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 user_name: "{{ item.username }}" user_password: "{{ item.password }}" grants: "{{ item.grants }}" loop: "{{ monitoring_influxdb_users }}" delegate_to: 127.0.0.1 no_log: true