- ntopng finished for Raspbian 10

This commit is contained in:
mpelle426
2019-07-24 15:15:26 +01:00
parent 5466f65dd2
commit 3ef23484d8
3 changed files with 36 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ invoke-rc.d ssh start
ssh-keygen -t rsa -b 2048 -f ~/.ssh/id_rsa -q -N ""
#
#
PUBKEY="'$(<~.ssh/id_rsa.pub)'" && ansible-playbook -i hosts deploy_authorized_keys.xml --ask-pass --extra-vars="pubkey=$PUBKEY"
PUBKEY="'$(<~/.ssh/id_rsa.pub)'" && ansible-playbook -i hosts deploy_authorized_keys.yml --ask-pass --extra-vars="pubkey=$PUBKEY"
ansible-playbook -i hosts main.yaml --ask-become-pass
ansible-playbook -i hosts reboot.yaml
reboot

View File

@@ -14,12 +14,28 @@
git:
repo: https://github.com/ntop/ntopng.git
dest: "{{ ansible_user_dir }}/ntopng"
- name: build nDPI
command: "./autogen.sh && ./configure --with-pic && make"
- name: run nDPI autogen.sh
command: "./autogen.sh"
args:
chdir: "{{ ansible_user_dir }}/nDPI"
- name: configure nDPI
command: "./configure --with-pic"
args:
chdir: "{{ ansible_user_dir }}/nDPI"
- name: build nDPI
command: "make -j 3"
args:
chdir: "{{ ansible_user_dir }}/nDPI"
- name: run ntopng autogen.sh
command: "./autogen.sh"
args:
chdir: "{{ ansible_user_dir }}/ntopng"
- name: run ntopng configure
command: "./configure"
args:
chdir: "{{ ansible_user_dir }}/ntopng"
- name: build ntopng
command: "./autogen.sh && ./configure && make"
command: "make -j 3"
args:
chdir: "{{ ansible_user_dir }}/ntopng"
- name: install
@@ -27,10 +43,20 @@
command: "make install"
args:
chdir: "{{ ansible_user_dir }}/ntopng"
- name: create ntopng group
become: yes
group:
name: ntopng
state: present
- name: creaate ntopng user
become: yes
user:
name: ntopng
group: ntopng
- name: create directories
become: yes
file:
path: "{{ items }}"
path: "{{ item }}"
state: directory
owner: ntopng
group: ntopng
@@ -39,7 +65,8 @@
- /usr/share/ntopng
- /etc/ntopng
- name: copy files
template:
become: yes
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: root
@@ -52,9 +79,11 @@
become: true
systemd:
daemon_reload: yes
tags: test
- name: start ntopng
become: yes
systemd:
name: ntopng.service
state: restarted
enabled: yes
tags: test

View File

@@ -11,3 +11,4 @@ ntopng_dependency_packages:
- libglib2.0-dev
- redis
- libmaxminddb-dev
- libjson-c-dev