buluma.influxdb

Ansible角色 influxdb

在RHEL、Debian和Ubuntu上安装和配置InfluxDB

GitHub 版本 问题 拉取请求 下载
github 版本 问题 拉取请求 Ansible角色

示例剧本

此示例来自于molecule/default/converge.yml,并在每次推送、拉取请求和版本发布时进行测试。

---
- name: 集成
  hosts: all
  vars:
    influxdb_admin_username: admin
    influxdb_admin_password: admin123
    influxdb_databases:
      - name: telegraf-metrics
        state: present
    influxdb_users:
      - name: telegraf
        password: telegraf
        grants:
          - database: telegraf-metrics
            privilege: "WRITE"
  roles:
    - role: buluma.influxdb

机器需要准备好。在CI中使用molecule/default/prepare.yml 进行准备:

---
- name: 准备容器
  hosts: all
  gather_facts: true
  roles:
    - role: buluma.bootstrap
    - role: buluma.epel
    # - role: buluma.buildtools
    # - role: buluma.ca_certificates

  tasks:
    - name: 在RHEL7上安装python-pip
      yum:
        name: python-pip
        state: present
      when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "7"

    - name: 在RHEL8上安装python3-pip
      yum:
        name: python3
        state: present
      when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "8"

    - name: 在Ubuntu上安装pip
      apt:
        name: "{{ item }}"
        update_cache: yes
        state: present
      loop:
        - python3-pip
        - python3-setuptools
        - gnupg
      when: ( ansible_os_family == "Debian" and ansible_distribution == "Ubuntu" )

    - name: 在Debian上安装pip
      apt:
        name: "{{ item }}"
        state: present
        update_cache: true
      loop:
        - gnupg
        - python-setuptools
        - python-pip
      when: ( ansible_os_family == "Debian" and ( ansible_distribution_major_version == "10" or ansible_distribution_major_version == "9" ))

还请查看完整说明和示例,了解如何使用这些角色。

角色变量

变量的默认值在defaults/main.yml中设置:

---
influxdb_manage_repository: yes
influxdb_manage_package: yes
influxdb_config_dir: /etc/influxdb
influxdb_config_global:
    reporting-disabled: false
    bind-address: 127.0.0.1:8088
influxdb_config_graphite:
    - enabled: false
      tags:
          - region=us
          - zone=test
influxdb_config_collectd:
    - enabled: false
influxdb_config_udp:
    - enabled: false
influxdb_config_meta:
    dir: /var/lib/influxdb/meta
    retention-autocreate: true
    logging-enabled: true
influxdb_config_http:
    enabled: true
    https-enabled: false
    bind-address: 127.0.0.1:8086
    auth-enabled: true
    ping-auth-enabled: true
influxdb_config_data:
    dir: /var/lib/influxdb/data
    wal-dir: /var/lib/influxdb/wal
    series-id-set-cache-size: 100
influxdb_admin_username: admin
influxdb_admin_password: admin

要求

已使用角色的状态

以下角色用于准备系统。您可以以其他方式准备系统。

要求 GitHub 版本
buluma.bootstrap Ansible Molecule 版本
buluma.epel Ansible Molecule 版本
buluma.buildtools Ansible Molecule 版本
buluma.ca_certificates Ansible Molecule 版本

上下文

此角色是许多兼容角色的一部分。请查看这些角色的文档以获取更多信息。

这里是相关角色的概述:

依赖

兼容性

此角色已在以下容器镜像上进行了测试:

容器 标签
EL 所有
Ubuntu 所有
Debian 所有

所需的最低Ansible版本为2.10,测试已在:

  • 先前版本。
  • 当前版本。
  • 开发版本。

如果您发现问题,请在GitHub上报告。

变更记录

角色历史

许可证

Apache-2.0

作者信息

Shadow Walker

安装
ansible-galaxy install buluma.influxdb
许可证
apache-2.0
下载
13k
拥有者
DevOps Engineer