buluma.influxdb

Rola Ansible influxdb

Instaluje i konfiguruje InfluDB na Rhel, Debian i Ubuntu

GitHub Wersja Problemy Prośby o zmiany Pobrania
github Wersja Problemy Prośby o zmiany Rola Ansible

Przykładowy Playbook

Ten przykład pochodzi z molecule/default/converge.yml i jest testowany przy każdym pushu, prośbie o zmianę i wydaniu.

---
- name: Połączenie
  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

Maszyna musi być przygotowana. W CI robi się to przy użyciu molecule/default/prepare.yml:

---
- name: Przygotuj kontener
  hosts: all
  gather_facts: true
  roles:
    - role: buluma.bootstrap
    - role: buluma.epel
    # - role: buluma.buildtools
    # - role: buluma.ca_certificates

  tasks:
    - name: zainstaluj python-pip na RHEL7
      yum:
        name: python-pip
        state: present
      when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "7"

    - name: zainstaluj python3-pip na RHEL8
      yum:
        name: python3
        state: present
      when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "8"

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

    - name: zainstaluj pip na Debianie
      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" ))

Zobacz również pełne wyjaśnienie i przykład na temat używania tych ról.

Zmienne roli

Domyślne wartości zmiennych są ustawione w 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

Wymagania

Stan używanych ról

Następujące role są używane do przygotowania systemu. Możesz przygotować swój system w inny sposób.

Wymaganie GitHub Wersja
buluma.bootstrap Ansible Molecule Wersja
buluma.epel Ansible Molecule Wersja
buluma.buildtools Ansible Molecule Wersja
buluma.ca_certificates Ansible Molecule Wersja

Kontekst

Ta rola jest częścią wielu zgodnych ról. Zobacz dokumentację tych ról tutaj dla dalszych informacji.

Oto przegląd powiązanych ról:

zależności

Kompatybilność

Ta rola była testowana na tych obrazach kontenerów:

kontener tagi
EL wszystkie
Ubuntu wszystkie
Debian wszystkie

Minimalna wymagana wersja Ansible to 2.10, testy przeprowadzono dla:

  • Wersji poprzedniej.
  • Wersji bieżącej.
  • Wersji deweloperskiej.

Jeśli znajdziesz problemy, zgłoś je na GitHubie

Dziennik zmian

Historia roli

Licencja

Apache-2.0

Informacje o autorze

Shadow Walker

Zainstaluj
ansible-galaxy install buluma.influxdb
Licencja
apache-2.0
Pobrania
13k
Właściciel
DevOps Engineer