buluma.grafana

Ansible Role: Grafana

Grafana - a platform used for analytics and monitoring.

GitHub Version Issues Pull Requests Downloads
github Version Issues PullRequests Ansible Role

Example Playbook

This example is taken from the file molecule/default/converge.yml and is tested with each update.

---
- name: Converge
  hosts: all
  become: yes
  gather_facts: yes

  roles:
    - role: buluma.grafana
      vars:
        grafana_security:
          admin_user: admin
          admin_password: password

Before using Grafana, the machine needs to be set up. In CI, this is done using molecule/default/prepare.yml:

---
- name: Prepare
  hosts: all
  gather_facts: no
  become: yes

  roles:
    - role: buluma.bootstrap

For more detailed usage, please refer to the full explanation and example.

Role Variables

Default variable values are set in defaults/main.yml:

---
grafana_version: latest
grafana_yum_repo_template: etc/yum.repos.d/grafana.repo.j2
grafana_manage_repo: true

grafana_use_provisioning: true
grafana_provisioning_synced: false

grafana_instance: "{{ ansible_fqdn | default(ansible_host) | default(inventory_hostname) }}"
grafana_logs_dir: "/var/log/grafana"
grafana_data_dir: "/var/lib/grafana"

grafana_address: "0.0.0.0"
grafana_port: 3000
grafana_cap_net_bind_service: false

grafana_url: "http://{{ grafana_address }}:{{ grafana_port }}"
grafana_api_url: "{{ grafana_url }}"
grafana_domain: "{{ ansible_fqdn | default(ansible_host) | default('localhost') }}"

grafana_server:
  protocol: http
  enforce_domain: false
  socket: ""
  cert_key: ""
  cert_file: ""
  enable_gzip: false
  static_root_path: public
  router_logging: false
  serve_from_sub_path: false

grafana_security:
  admin_user: admin
  admin_password: "password"

grafana_database:
  type: sqlite3

grafana_users:
  allow_sign_up: false
  auto_assign_org_role: Viewer
  default_theme: dark

Requirements

State of Used Roles

The following roles are used to prepare a system:

Requirement GitHub Version
buluma.bootstrap Ansible Molecule Version

Context

This role is part of multiple compatible roles. For more details, check the documentation of these roles.

Compatibility

This role has been tested with the following container images:

container tags
Ubuntu all
Debian all
EL all
Fedora all

The minimum Ansible version required is 2.12, and tests have been conducted on:

  • Previous versions.
  • Current version.
  • Development version.

For issues, please report them on GitHub.

Changelog

Role History

License

Apache-2.0

Author Information

Shadow Walker

Informazioni sul progetto

Grafana - platform for analytics and monitoring

Installa
ansible-galaxy install buluma.grafana
Licenza
apache-2.0
Download
374
Proprietario
DevOps Engineer