Ansible role to install & configure netdata. By default installs the latest netdata version using the kickstart script, can be customized by overriding the variable netdata_version.
This role does not compile netdata, it downloads and executes the netdata self-extracting installation archive intended to work on most any Linux systems.
Tested on Ubuntu using Ansible 2.1.6.0, 2.2.2.0 and latest versions.
The netdata configuration files are deployed by the netdata makeself self-extracting installation script. To customize the file create a role/playbook that runs ansible-role-netdata and then deploys your netdata version-controlled configuration files.
The variable netdata_version can be either latest or a valid netdata version string: vN.N.N-xxx-<hash> (default is latest).
The following default variables are also configurable:
netdata_force_installcontrols installation even when netdata is already installed (defaults totrue)netdata_kickstart_download_urlis the kickstart shell script to install the latest netdata versionnetdata_base_urlis the base binary packages GitHub URLnetdata_installer_tmp_diris the temporary location where the kickstart script or makeself *.run file is downloaded to, default:/tmp(assumes it already exists)netdata_conf,netdata_logrotate_confandnetdata_systemd_unitcontrol the location of the templated configuration files- Systemd unit configurable variables:
netdata_user,netdata_group,netdata_binary,netdata_oom_score,netdata_systemd_timeout_stop_sec
- hosts: all
become: yes
roles:
- { role: avishefi.netdata }A testing playbook that uses ansible-role-netdata can be found on: tests/test.yml. The role is tested using InSpec for basic netdata installation testing.
Execute vagrant up to provision a guest VirtualBox machine with netdata installed using this role. Upon completion, netdata will be available at http://localhost:19999/.
The Vagrantfile supports a netdata version argument passed as an environment variable, for example: NETDATA_VERSION=vx.y.z-NNN-<hash> vagrant up. Check the binary-packages GitHub repository for the list of netdata versions.
The default value for NETDATA_VERSION is latest.
MIT