- 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 "" 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 main.yaml --ask-become-pass
ansible-playbook -i hosts reboot.yaml ansible-playbook -i hosts reboot.yaml
reboot reboot

View File

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

View File

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