From bdc70b0a8e0cb8ea6d4c4d8f9a75a183431fa21d Mon Sep 17 00:00:00 2001 From: Kurnesay Date: Sun, 25 Oct 2026 21:32:28 +0300 Subject: [PATCH] Removed data not related to NextCloud --- roles/homelab/nextcloud/handlers/main.yml | 5 --- .../nextcloud/tasks/configure_system.yml | 10 ----- .../nextcloud/tasks/download_nextcloud.yml | 8 +--- .../nextcloud/tasks/install_packages.yml | 8 ---- roles/homelab/nextcloud/tasks/main.yml | 3 -- .../nextcloud/templates/mirror-yandex.ru.j2 | 8 ---- .../nextcloud/templates/nftables.conf.j2 | 40 ------------------- 7 files changed, 1 insertion(+), 81 deletions(-) delete mode 100644 roles/homelab/nextcloud/tasks/configure_system.yml delete mode 100644 roles/homelab/nextcloud/templates/mirror-yandex.ru.j2 delete mode 100644 roles/homelab/nextcloud/templates/nftables.conf.j2 diff --git a/roles/homelab/nextcloud/handlers/main.yml b/roles/homelab/nextcloud/handlers/main.yml index 64ad7f6..c497c6d 100644 --- a/roles/homelab/nextcloud/handlers/main.yml +++ b/roles/homelab/nextcloud/handlers/main.yml @@ -1,10 +1,5 @@ --- -- name: "restart nftables" - ansible.builtin.systemd: - name: nftables - state: restarted - - name: "restart apache2" ansible.builtin.systemd: name: apache2 diff --git a/roles/homelab/nextcloud/tasks/configure_system.yml b/roles/homelab/nextcloud/tasks/configure_system.yml deleted file mode 100644 index f17006f..0000000 --- a/roles/homelab/nextcloud/tasks/configure_system.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- - -- name: "Upload nftables config" - ansible.builtin.template: - src: nftables.conf.j2 - dest: /etc/nftables.conf - owner: root - group: root - mode: '0644' - notify: "restart nftables" \ No newline at end of file diff --git a/roles/homelab/nextcloud/tasks/download_nextcloud.yml b/roles/homelab/nextcloud/tasks/download_nextcloud.yml index 7d3815a..5e6fb02 100644 --- a/roles/homelab/nextcloud/tasks/download_nextcloud.yml +++ b/roles/homelab/nextcloud/tasks/download_nextcloud.yml @@ -15,10 +15,4 @@ path: /var/www/nextcloud-data owner: www-data group: www-data - mode: '0700' - -#- name: "Change path to nextcloud data" -# ansible.builtin.replace: -# path: /var/www/nextcloud/config/config.php -# regexp: "'datadirectory' => '/var/www/nextcloud/data'" -# replace: "'datadirectory' => '/var/www/nextcloud-data'" \ No newline at end of file + mode: '0700' \ No newline at end of file diff --git a/roles/homelab/nextcloud/tasks/install_packages.yml b/roles/homelab/nextcloud/tasks/install_packages.yml index d1e136f..3e6d55b 100644 --- a/roles/homelab/nextcloud/tasks/install_packages.yml +++ b/roles/homelab/nextcloud/tasks/install_packages.yml @@ -1,13 +1,5 @@ --- -- name: "Change repos" - ansible.builtin.template: - src: mirror-yandex.ru.j2 - dest: /etc/apt/sources.list - owner: root - group: root - mode: '0744' - - name: "Install packages" ansible.builtin.apt: name: "{{ packages }}" diff --git a/roles/homelab/nextcloud/tasks/main.yml b/roles/homelab/nextcloud/tasks/main.yml index 816580a..b806734 100644 --- a/roles/homelab/nextcloud/tasks/main.yml +++ b/roles/homelab/nextcloud/tasks/main.yml @@ -3,9 +3,6 @@ - name: "Install packages" ansible.builtin.include_tasks: install_packages.yml -- name: "Configure system" - ansible.builtin.include_tasks: configure_system.yml - - name: "Download NextCloud" ansible.builtin.include_tasks: download_nextcloud.yml diff --git a/roles/homelab/nextcloud/templates/mirror-yandex.ru.j2 b/roles/homelab/nextcloud/templates/mirror-yandex.ru.j2 deleted file mode 100644 index 646b499..0000000 --- a/roles/homelab/nextcloud/templates/mirror-yandex.ru.j2 +++ /dev/null @@ -1,8 +0,0 @@ -deb http://mirror.yandex.ru/debian/ trixie main non-free-firmware -#deb-src http://mirror.yandex.ru/debian/ trixie main non-free-firmware - -deb http://mirror.yandex.ru/debian-security trixie-security main non-free-firmware -#deb-src http://mirror.yandex.ru/debian-security trixie-security main non-free-firmware - -deb http://mirror.yandex.ru/debian/ trixie-updates main non-free-firmware -#deb-src http://mirror.yandex.ru/debian/ trixie-updates main non-free-firmware \ No newline at end of file diff --git a/roles/homelab/nextcloud/templates/nftables.conf.j2 b/roles/homelab/nextcloud/templates/nftables.conf.j2 deleted file mode 100644 index 822cb87..0000000 --- a/roles/homelab/nextcloud/templates/nftables.conf.j2 +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/sbin/nft -f - -flush ruleset - -table inet filter { - set home_net { - type ipv4_addr - flags interval - comment "Home subnet" - elements = {100.222.5.0/24} - } - set iot_net { - type ipv4_addr - flags interval - comment "iOT subnet" - elements = {100.222.6.0/24} - } - - chain input { - type filter hook input priority filter; policy drop; - - iif lo accept comment "Accept any localhost trafic" - ct state invalid drop comment "Drop invalid connection" - fib daddr . iif type != {local, broadcast, multicast} drop - ct state { established, related } accept - - #meta l4proto { icmp, ipv6-icmp } accept comment "Accept ICMP" - - tcp dport 22 accept comment "Allow ssh connection from home subnet" - - tcp dport 443 accept comment "Wireguard port" - tcp dport 80 accept comment "Wireguard port" - } - chain forward { - type filter hook forward priority filter; - } - chain output { - type filter hook output priority filter; - } -} \ No newline at end of file -- 2.47.3