- ntop setup for raspberry pi. will add ntop for ubuntu versions later

This commit is contained in:
Pi
2019-07-19 15:27:15 -04:00
parent 107eb82518
commit 052b3b7aa0
6 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
---
- name: Check if ntopng is installed
become: yes
command: dpkg-query -W "{{ ntopng_deb }}"
register: ntopng_check_deb
failed_when: ntopng_check_deb.rc > 1
changed_when: ntopng_check_deb.rc == 1
- name: Download ntopng
get_url:
url="{{ ntopng_deb_url }}"
dest="/home/{{ ansible_env.USER }}/Downloads/{{ ntopng_deb }}.deb"
when: ntopng_check_deb.rc == 1
- name: Install ntopng source
become: yes
apt: deb="/home/{{ ansible_env.USER }}/Downloads/{{ ntopng_deb }}.deb"
when: ntopng_check_deb.rc == 1
- name: install ntopng
become: yes
apt:
name: ntopng
state: present
update_cache: yes
- name: start ntopng
become: yes
systemd:
name: ntopng.service
state: restarted
enabled: yes