-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ansible Installation script is now fine
+ Ansible isntallation script is now fine + added jars to support compilation and execution + Seems all is OK.
- Loading branch information
1 parent
4290b06
commit 5a10e21
Showing
11 changed files
with
99 additions
and
13 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
build.xml | ||
nbproject/* | ||
|
||
|
||
FilterTLK\.retry |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
--- | ||
#Note: This playbook only works in Ubuntu Systems | ||
- hosts: dest | ||
vars: | ||
dest_dir: "/opt/filter.tlk/" #Change the installation directory | ||
|
||
tasks: | ||
- name: ensure {{item}} is in the latest version | ||
apt: | ||
name: "{{item}}" | ||
state: latest | ||
with_items: [ "wireshark", "libndpi-bin", "lua5.2", "default-jdk", "tcpdump", "dialog", "iproute2" ] | ||
when: ansible_distribution == 'Ubuntu' | ||
|
||
- name: copy ndpiReader to the Wireshark's extcap | ||
copy: | ||
src: ndpiReader | ||
dest: /usr/lib/x86_64-linux-gnu/wireshark/extcap/ | ||
when: ansible_distribution == 'Ubuntu' | ||
|
||
- name: copy ndpi.lua to the Wireshark's plugins | ||
copy: | ||
src: ndpi.lua | ||
dest: /usr/lib/x86_64-linux-gnu/wireshark/plugins/ | ||
when: ansible_distribution == 'Ubuntu' | ||
|
||
- name: Remove previous installation | ||
file: | ||
path: "{{ dest_dir }}" | ||
state: absent | ||
|
||
- name: Create directory for compiling source | ||
file: | ||
path: /tmp/src/dest | ||
state: directory | ||
|
||
- name: install additional tools | ||
copy: | ||
src: "{{ item }}" | ||
dest: "/tmp/src" | ||
with_items: | ||
- beansbinding-1.2.1.jar | ||
- AbsoluteLayout.jar | ||
|
||
- name: Synchronize source | ||
synchronize: | ||
src: src | ||
dest: /tmp/src | ||
mode: push | ||
|
||
- name: compile src | ||
shell: javac -classpath ../dest:../AbsoluteLayout.jar:../beansbinding-1.2.1.jar -d ../dest es/uvigo/esei/filter/*.java | ||
args: | ||
chdir: /tmp/src/src | ||
|
||
- name: make jar file | ||
shell: | | ||
echo Main-Class: es.uvigo.esei.filter.Main > ../mf.txt | ||
jar xf ../beansbinding-1.2.1.jar | ||
jar xf ../AbsoluteLayout.jar | ||
mkdir -p es/uvigo/esei/images | ||
cp ../src/es/uvigo/esei/images/* es/uvigo/esei/images/ | ||
jar cfm ../BDAT.jar ../mf.txt * | ||
args: | ||
chdir: /tmp/src/dest | ||
|
||
- name: Create installation destination dir | ||
file: | ||
path: "{{ dest_dir }}/bin" | ||
state: directory | ||
|
||
- name: install BDAT | ||
shell: mv /tmp/src/BDAT.jar {{ dest_dir }}/bin | ||
|
||
- name: install additional tools | ||
copy: | ||
src: "{{ item }}" | ||
dest: "{{ dest_dir }}/bin" | ||
with_items: ['IPTRB.sh', 'BTT.lua'] | ||
|
||
- name: clean compilation dir | ||
file: | ||
path: "/tmp/src" | ||
state: absent | ||
|
||
- name: Print information | ||
debug: | ||
msg: | | ||
Filter.tlk sucessfully installed in {{ dest_dir }}. | ||
Tools have been included in {{ dest_dir }}/bin/ | ||
To launch BTT use wireshark -X lua_script:{{ dest_dir }}/bin/BTT.lua |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[defaults] | ||
inventory = ./hosts |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[dest] | ||
localhost ansible_connection=local |
Binary file not shown.
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
Binary file not shown.
Binary file not shown.