Created
June 21, 2016 06:34
-
-
Save mrcrilly/5005206f901cbd01d8211c5d9eb4e598 to your computer and use it in GitHub Desktop.
netdata Ansible Playbook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Install netdata on a Linux host | |
hosts: all | |
become: true | |
tasks: | |
- name: Install depdendencies | |
yum: | |
name: "{{item}}" | |
state: present | |
with_items: | |
- zlib-devel | |
- libuuid-devel | |
- libmnl-devel | |
- gcc | |
- make | |
- git | |
- autoconf | |
- autogen | |
- automake | |
- pkgconfig | |
- name: Download and extract netdata | |
unarchive: | |
src: https://github.com/firehol/netdata/releases/download/v1.2.0/netdata-1.2.0.tar.gz | |
dest: /tmp/ | |
copy: no | |
creates: /tmp/netdata-1.2.0 | |
- name: Install netdata | |
shell: cd /tmp/netdata-1.2.0; ./netdata-installer.sh | |
- name: Move the systemd file in place | |
copy: | |
remote_src: true | |
src: /tmp/netdata-1.2.0/system/netdata-init-d | |
dest: /etc/init.d/netdata | |
mode: 0770 | |
- name: Start the service | |
service: | |
name: netdata | |
state: started | |
enabled: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm willing to offer help free up to a point :-)
You might want to consider an existing role, though: https://galaxy.ansible.com/soehlert/netdata
Reach out to me at mrcrilly@gmail.com