From c96433adb873d4362cad9fee4635de79e19d15b4 Mon Sep 17 00:00:00 2001 From: bcurran3 Date: Mon, 15 Aug 2022 14:55:47 -0700 Subject: [PATCH 1/4] FIX: duplicati - allow restore of docker persistent data - adds ability to restore to docker_home when duplicati_data_permissions is overridden to "rw" NOTE: I'm not sure why this wasn't addressed in https://github.com/davestephens/ansible-nas/pull/204. I addressed it with a question in https://github.com/davestephens/ansible-nas/issues/171 but never received a response. Hopefully this is a desirable enhancement allowing direct restoring of the container persistent data without having to restore to a temp area and then move them. --- roles/duplicati/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/duplicati/tasks/main.yml b/roles/duplicati/tasks/main.yml index 0b5771ea..291fe15e 100644 --- a/roles/duplicati/tasks/main.yml +++ b/roles/duplicati/tasks/main.yml @@ -16,7 +16,7 @@ volumes: - "{{ duplicati_data_directory }}:/config:rw" - "{{ samba_shares_root }}:/source/shares:{{ duplicati_data_permissions }}" - - "{{ docker_home }}:/source/docker:ro" + - "{{ docker_home }}:/source/docker:{{ duplicati_data_permissions }}" - "/etc/timezone:/etc/timezone:ro" env: TZ: "{{ ansible_nas_timezone }}" From bb501d8fba852830cdc0d5d752a344e172b10c5a Mon Sep 17 00:00:00 2001 From: HitLuca Date: Wed, 17 Aug 2022 13:48:30 +0200 Subject: [PATCH 2/4] :building_construction: removed cron_file command from cron task --- roles/healthchecks.io/tasks/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/healthchecks.io/tasks/main.yml b/roles/healthchecks.io/tasks/main.yml index 47289c5a..e9a7e145 100644 --- a/roles/healthchecks.io/tasks/main.yml +++ b/roles/healthchecks.io/tasks/main.yml @@ -4,5 +4,4 @@ name: healthchecks.io minute: "*/{{ healthchecks_ping_minutes }}" user: root - cron_file: /etc/crontab job: "curl -m 10 --retry 5 {{ healthchecks_url }}" From 3c6ace4e75876ad9ef8185f6ab0dde19ffb1ffc2 Mon Sep 17 00:00:00 2001 From: bcurran3 Date: Wed, 17 Aug 2022 20:20:42 -0700 Subject: [PATCH 3/4] fix n8n tag --- nas.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nas.yml b/nas.yml index 3e9cf2d7..efd92b75 100644 --- a/nas.yml +++ b/nas.yml @@ -212,7 +212,7 @@ - role: n8n tags: - - n8n_enabled + - n8n when: (n8n_enabled | default(False)) - role: navidrome From 06f0cf71b595dd503abe97273ffe7c5ab5d7b9d6 Mon Sep 17 00:00:00 2001 From: bcurran3 Date: Thu, 18 Aug 2022 00:29:10 -0700 Subject: [PATCH 4/4] =?UTF-8?q?ADD:=20Wireshark=20-=20the=20world=E2=80=99?= =?UTF-8?q?s=20foremost=20and=20widely-used=20network=20protocol=20analyze?= =?UTF-8?q?r=20(#578)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add Wireshark --- README.md | 1 + docs/applications/wireshark.md | 11 +++++++++ docs/configuration/application_ports.md | 1 + nas.yml | 5 ++++ roles/wireshark/defaults/main.yml | 17 +++++++++++++ roles/wireshark/tasks/main.yml | 32 +++++++++++++++++++++++++ 6 files changed, 67 insertions(+) create mode 100644 docs/applications/wireshark.md create mode 100644 roles/wireshark/defaults/main.yml create mode 100644 roles/wireshark/tasks/main.yml diff --git a/README.md b/README.md index ae91ded6..29d0c041 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,7 @@ If you have a spare domain name you can configure applications to be accessible * [Virtual Desktop](https://github.com/RattyDAVE/docker-ubuntu-xrdp-mate-custom) - A virtual desktop running on your NAS. * [Wallabag](https://wallabag.org/) - Save and classify articles. Read them later. * [Watchtower](https://github.com/v2tec/watchtower) - Monitor your Docker containers and update them if a new version is available +* [Wireshark](https://www.wireshark.org/) - the world’s foremost and widely-used network protocol analyzer. * [YouTubeDL-Material](https://github.com/Tzahi12345/YoutubeDL-Material) - Self-hosted YouTube downloader built on Material Design * [ZNC](https://wiki.znc.in/ZNC) - IRC bouncer to stay connected to favourite IRC networks and channels diff --git a/docs/applications/wireshark.md b/docs/applications/wireshark.md new file mode 100644 index 00000000..34442ab1 --- /dev/null +++ b/docs/applications/wireshark.md @@ -0,0 +1,11 @@ +# Wireshark + +Homepage: + +Wireshark is the world’s foremost and widely-used network protocol analyzer. It lets you see what’s happening on your network at a microscopic level and is the de facto (and often de jure) standard across many commercial and non-profit enterprises, government agencies, and educational institutions. Wireshark development thrives thanks to the volunteer contributions of networking experts around the globe and is the continuation of a project started by Gerald Combs in 1998. + +## Usage + +Set `wireshark_enabled: true` in your `inventories//nas.yml` file. + +The Wireshark web interface can be found at . diff --git a/docs/configuration/application_ports.md b/docs/configuration/application_ports.md index 042b6050..a2f8b21f 100644 --- a/docs/configuration/application_ports.md +++ b/docs/configuration/application_ports.md @@ -100,5 +100,6 @@ By default, applications can be found on the ports listed below. | uTorrent | 6881 | Bridge | BT | | uTorrent | 6881 | Bridge | UDP | | Wallabag | 7780 | Bridge | HTTP | +| Wireshark | 3000 | Host | HTTP | | YouTubeDL-Mater | 8998 | Bridge | HTTP | | ZNC | 6677 | Bridge | | diff --git a/nas.yml b/nas.yml index efd92b75..cd72f821 100644 --- a/nas.yml +++ b/nas.yml @@ -375,6 +375,11 @@ - watchtower when: (watchtower_enabled | default(False)) + - role: wireshark + tags: + - wireshark + when: (wireshark_enabled | default(False)) + - role: znc tags: - znc diff --git a/roles/wireshark/defaults/main.yml b/roles/wireshark/defaults/main.yml new file mode 100644 index 00000000..30e729ec --- /dev/null +++ b/roles/wireshark/defaults/main.yml @@ -0,0 +1,17 @@ +--- +# enable or disable the application +wireshark_enabled: false +wireshark_available_externally: false + +# directories +wireshark_data_directory: "{{ docker_home }}/wireshark" + +# uid / gid +wireshark_user_id: "1000" +wireshark_group_id: "1000" + +# network +wireshark_hostname: "wireshark" + +# specs +wireshark_memory: "512m" diff --git a/roles/wireshark/tasks/main.yml b/roles/wireshark/tasks/main.yml new file mode 100644 index 00000000..318ecaae --- /dev/null +++ b/roles/wireshark/tasks/main.yml @@ -0,0 +1,32 @@ +--- +- name: Create Wireshark Directories + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ wireshark_data_directory }}" + - "{{ wireshark_data_directory }}/config" + +- name: Create Wireshark Docker Container + docker_container: + name: wireshark + image: linuxserver/wireshark:latest + pull: true + volumes: + - "{{ wireshark_data_directory }}/config:/config:rw" + network_mode: host + env: + TZ: "{{ ansible_nas_timezone }}" + PUID: "{{ wireshark_user_id }}" + PGID: "{{ wireshark_group_id }}" + capabilities: + - NET_ADMIN + restart_policy: unless-stopped + memory: "{{ wireshark_memory }}" + labels: + traefik.enable: "{{ wireshark_available_externally | string }}" + traefik.http.routers.wireshark.rule: "Host(`{{ wireshark_hostname }}.{{ ansible_nas_domain }}`)" + traefik.http.routers.wireshark.tls.certresolver: "letsencrypt" + traefik.http.routers.wireshark.tls.domains[0].main: "{{ ansible_nas_domain }}" + traefik.http.routers.wireshark.tls.domains[0].sans: "*.{{ ansible_nas_domain }}" + traefik.http.services.wireshark.loadbalancer.server.port: "3000"