summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ansible/netdata.yml62
1 files changed, 62 insertions, 0 deletions
diff --git a/ansible/netdata.yml b/ansible/netdata.yml
new file mode 100644
index 000000000..4c7e73681
--- /dev/null
+++ b/ansible/netdata.yml
@@ -0,0 +1,62 @@
+---
+- name: "Install pre-requisites"
+ apt:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - autoconf
+ - autoconf-archive
+ - autogen
+ - automake
+ - gcc
+ - git
+ - libmnl-dev
+ - make
+ - pkg-config
+ - uuid-dev
+ - zlib1g-dev
+ when: ansible_os_family == "Debian"
+
+- name: "Install pre-requisites"
+ yum:
+ name: "{{ item }}"
+ state: present
+ with_items:
+ - autoconf
+ - autoconf-archive
+ - autogen
+ - automake
+ - curl
+ - gcc
+ - git
+ - jq
+ - libmnl-devel
+ - libuuid-devel
+ - make
+ - pkgconfig
+ - zlib-devel
+ when: ansible_os_family == "RedHat"
+
+- name: "Clone repo"
+ git:
+ clone: yes
+ repo: https://github.com/firehol/netdata.git
+ dest: /tmp/netdata
+
+- name: "Installation"
+ shell: cd /tmp/netdata/ && ./netdata-installer.sh --dont-wait --libs-are-really-here
+
+- name: "Clean /tmp"
+ file:
+ path: /tmp/netdata
+ state: absent
+
+- name: "KillAll"
+ shell: killall netdata
+
+- name: "Daemon config"
+ systemd:
+ daemon_reload: yes
+ name: netdata
+ enabled: yes
+ state: started