From c11333be9a681e217e1f00782f2297f0d914d02a Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sat, 2 Sep 2023 09:45:26 +0200 Subject: [PATCH] Refactored independent_ --- README.md | 2 +- playbook.yml | 6 +++--- .../README.md | 0 .../files/wireguard-ip.conf | 0 .../handlers/main.yml | 0 .../tasks/main.yml | 0 .../{independent_backup-to-usb => backup-to-usb}/README.md | 2 +- .../files/backup-to-usb.python | 0 .../handlers/main.yml | 0 roles/backup-to-usb/meta/main.yml | 3 +++ .../tasks/main.yml | 0 .../templates/backup-to-usb.service.j2 | 0 .../vars/main.yml | 0 .../README.md | 2 +- .../files/backups-cleanup.py | 0 .../handlers/main.yml | 0 .../meta/main.yml | 0 .../tasks/main.yml | 0 .../templates/backups-cleanup.service.j2 | 0 .../vars/main.yml | 0 roles/backups-cleanup-timer/README.md | 3 +++ .../handlers/main.yml | 0 roles/backups-cleanup-timer/meta/main.yml | 2 ++ .../tasks/main.yml | 0 .../templates/backups-cleanup.timer.j2 | 0 roles/client_application-wireguard/meta/main.yml | 2 +- roles/independent_backup-to-usb/meta/main.yml | 3 --- roles/independent_backups-cleanup-timer/README.md | 3 --- roles/independent_backups-cleanup-timer/meta/main.yml | 2 -- roles/independent_system-update/meta/main.yml | 3 --- roles/native-backups-consumer/meta/main.yml | 2 +- roles/native-backups-provider/meta/main.yml | 2 +- .../README.md | 2 +- .../tasks/main.yml | 0 .../tasks/main.yml | 0 roles/system-update/meta/main.yml | 3 +++ 36 files changed, 21 insertions(+), 21 deletions(-) rename roles/{independent_application-wireguard => application-wireguard}/README.md (100%) rename roles/{independent_application-wireguard => application-wireguard}/files/wireguard-ip.conf (100%) rename roles/{independent_application-wireguard => application-wireguard}/handlers/main.yml (100%) rename roles/{independent_application-wireguard => application-wireguard}/tasks/main.yml (100%) rename roles/{independent_backup-to-usb => backup-to-usb}/README.md (95%) rename roles/{independent_backup-to-usb => backup-to-usb}/files/backup-to-usb.python (100%) rename roles/{independent_backup-to-usb => backup-to-usb}/handlers/main.yml (100%) create mode 100644 roles/backup-to-usb/meta/main.yml rename roles/{independent_backup-to-usb => backup-to-usb}/tasks/main.yml (100%) rename roles/{independent_backup-to-usb => backup-to-usb}/templates/backup-to-usb.service.j2 (100%) rename roles/{independent_backup-to-usb => backup-to-usb}/vars/main.yml (100%) rename roles/{independent_backups-cleanup-service => backups-cleanup-service}/README.md (85%) rename roles/{independent_backups-cleanup-service => backups-cleanup-service}/files/backups-cleanup.py (100%) rename roles/{independent_backups-cleanup-service => backups-cleanup-service}/handlers/main.yml (100%) rename roles/{independent_backups-cleanup-service => backups-cleanup-service}/meta/main.yml (100%) rename roles/{independent_backups-cleanup-service => backups-cleanup-service}/tasks/main.yml (100%) rename roles/{independent_backups-cleanup-service => backups-cleanup-service}/templates/backups-cleanup.service.j2 (100%) rename roles/{independent_backups-cleanup-service => backups-cleanup-service}/vars/main.yml (100%) create mode 100644 roles/backups-cleanup-timer/README.md rename roles/{independent_backups-cleanup-timer => backups-cleanup-timer}/handlers/main.yml (100%) create mode 100644 roles/backups-cleanup-timer/meta/main.yml rename roles/{independent_backups-cleanup-timer => backups-cleanup-timer}/tasks/main.yml (100%) rename roles/{independent_backups-cleanup-timer => backups-cleanup-timer}/templates/backups-cleanup.timer.j2 (100%) delete mode 100644 roles/independent_backup-to-usb/meta/main.yml delete mode 100644 roles/independent_backups-cleanup-timer/README.md delete mode 100644 roles/independent_backups-cleanup-timer/meta/main.yml delete mode 100644 roles/independent_system-update/meta/main.yml rename roles/{independent_system-apt-update => system-apt-update}/README.md (80%) rename roles/{independent_system-apt-update => system-apt-update}/tasks/main.yml (100%) rename roles/{independent_system-pacman => system-pacman}/tasks/main.yml (100%) create mode 100644 roles/system-update/meta/main.yml diff --git a/README.md b/README.md index 9264787b..fa912853 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ This software allows to setup the docker following applications: #### Native Applications This software shipts the following tools which are natively setup on the server: -- [Backups Cleanup](./roles/independent_backups-cleanup-timer/README.md) - Cleans up old backups +- [Backups Cleanup](./roles/backups-cleanup-timer/README.md) - Cleans up old backups - [Btrfs Health Check](./roles/native-btrfs-health-check/README.md) - Checks the health of Btrfs file systems - [Docker Health Check](./roles/native-docker-health-check/) - Checks the health of docker containers - [Docker Reverse Proxy](./roles/native-docker-reverse-proxy/README.md) - Docker Reverse Proxy Solution diff --git a/playbook.yml b/playbook.yml index 7f14ed94..06fdd66d 100644 --- a/playbook.yml +++ b/playbook.yml @@ -3,7 +3,7 @@ hosts: all become: true roles: - - independent_system-update + - system-update - name: servers host setup hosts: servers @@ -20,7 +20,7 @@ hosts: wireguard_server become: true roles: - - independent_application-wireguard + - application-wireguard - name: setup wireguard client behind firewall\nat hosts: wireguard_behind_firewall @@ -313,4 +313,4 @@ hosts: backup_to_usb become: true roles: - - independent_backup-to-usb \ No newline at end of file + - backup-to-usb \ No newline at end of file diff --git a/roles/independent_application-wireguard/README.md b/roles/application-wireguard/README.md similarity index 100% rename from roles/independent_application-wireguard/README.md rename to roles/application-wireguard/README.md diff --git a/roles/independent_application-wireguard/files/wireguard-ip.conf b/roles/application-wireguard/files/wireguard-ip.conf similarity index 100% rename from roles/independent_application-wireguard/files/wireguard-ip.conf rename to roles/application-wireguard/files/wireguard-ip.conf diff --git a/roles/independent_application-wireguard/handlers/main.yml b/roles/application-wireguard/handlers/main.yml similarity index 100% rename from roles/independent_application-wireguard/handlers/main.yml rename to roles/application-wireguard/handlers/main.yml diff --git a/roles/independent_application-wireguard/tasks/main.yml b/roles/application-wireguard/tasks/main.yml similarity index 100% rename from roles/independent_application-wireguard/tasks/main.yml rename to roles/application-wireguard/tasks/main.yml diff --git a/roles/independent_backup-to-usb/README.md b/roles/backup-to-usb/README.md similarity index 95% rename from roles/independent_backup-to-usb/README.md rename to roles/backup-to-usb/README.md index 0ee1468b..d3d74ead 100644 --- a/roles/independent_backup-to-usb/README.md +++ b/roles/backup-to-usb/README.md @@ -1,4 +1,4 @@ -# independent_backup-to-usb +# backup-to-usb This Ansible role automates the process of performing backups to a swappable USB device. diff --git a/roles/independent_backup-to-usb/files/backup-to-usb.python b/roles/backup-to-usb/files/backup-to-usb.python similarity index 100% rename from roles/independent_backup-to-usb/files/backup-to-usb.python rename to roles/backup-to-usb/files/backup-to-usb.python diff --git a/roles/independent_backup-to-usb/handlers/main.yml b/roles/backup-to-usb/handlers/main.yml similarity index 100% rename from roles/independent_backup-to-usb/handlers/main.yml rename to roles/backup-to-usb/handlers/main.yml diff --git a/roles/backup-to-usb/meta/main.yml b/roles/backup-to-usb/meta/main.yml new file mode 100644 index 00000000..ad475a48 --- /dev/null +++ b/roles/backup-to-usb/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - role: backups-cleanup-service diff --git a/roles/independent_backup-to-usb/tasks/main.yml b/roles/backup-to-usb/tasks/main.yml similarity index 100% rename from roles/independent_backup-to-usb/tasks/main.yml rename to roles/backup-to-usb/tasks/main.yml diff --git a/roles/independent_backup-to-usb/templates/backup-to-usb.service.j2 b/roles/backup-to-usb/templates/backup-to-usb.service.j2 similarity index 100% rename from roles/independent_backup-to-usb/templates/backup-to-usb.service.j2 rename to roles/backup-to-usb/templates/backup-to-usb.service.j2 diff --git a/roles/independent_backup-to-usb/vars/main.yml b/roles/backup-to-usb/vars/main.yml similarity index 100% rename from roles/independent_backup-to-usb/vars/main.yml rename to roles/backup-to-usb/vars/main.yml diff --git a/roles/independent_backups-cleanup-service/README.md b/roles/backups-cleanup-service/README.md similarity index 85% rename from roles/independent_backups-cleanup-service/README.md rename to roles/backups-cleanup-service/README.md index 929c3aea..73dafa9b 100644 --- a/roles/independent_backups-cleanup-service/README.md +++ b/roles/backups-cleanup-service/README.md @@ -1,4 +1,4 @@ -# role independent_backups-cleanup-timer +# role backups-cleanup-timer Cleans up old backups diff --git a/roles/independent_backups-cleanup-service/files/backups-cleanup.py b/roles/backups-cleanup-service/files/backups-cleanup.py similarity index 100% rename from roles/independent_backups-cleanup-service/files/backups-cleanup.py rename to roles/backups-cleanup-service/files/backups-cleanup.py diff --git a/roles/independent_backups-cleanup-service/handlers/main.yml b/roles/backups-cleanup-service/handlers/main.yml similarity index 100% rename from roles/independent_backups-cleanup-service/handlers/main.yml rename to roles/backups-cleanup-service/handlers/main.yml diff --git a/roles/independent_backups-cleanup-service/meta/main.yml b/roles/backups-cleanup-service/meta/main.yml similarity index 100% rename from roles/independent_backups-cleanup-service/meta/main.yml rename to roles/backups-cleanup-service/meta/main.yml diff --git a/roles/independent_backups-cleanup-service/tasks/main.yml b/roles/backups-cleanup-service/tasks/main.yml similarity index 100% rename from roles/independent_backups-cleanup-service/tasks/main.yml rename to roles/backups-cleanup-service/tasks/main.yml diff --git a/roles/independent_backups-cleanup-service/templates/backups-cleanup.service.j2 b/roles/backups-cleanup-service/templates/backups-cleanup.service.j2 similarity index 100% rename from roles/independent_backups-cleanup-service/templates/backups-cleanup.service.j2 rename to roles/backups-cleanup-service/templates/backups-cleanup.service.j2 diff --git a/roles/independent_backups-cleanup-service/vars/main.yml b/roles/backups-cleanup-service/vars/main.yml similarity index 100% rename from roles/independent_backups-cleanup-service/vars/main.yml rename to roles/backups-cleanup-service/vars/main.yml diff --git a/roles/backups-cleanup-timer/README.md b/roles/backups-cleanup-timer/README.md new file mode 100644 index 00000000..1c616c4f --- /dev/null +++ b/roles/backups-cleanup-timer/README.md @@ -0,0 +1,3 @@ +# role backups-cleanup-timer + +Timer for cleaning up old backups \ No newline at end of file diff --git a/roles/independent_backups-cleanup-timer/handlers/main.yml b/roles/backups-cleanup-timer/handlers/main.yml similarity index 100% rename from roles/independent_backups-cleanup-timer/handlers/main.yml rename to roles/backups-cleanup-timer/handlers/main.yml diff --git a/roles/backups-cleanup-timer/meta/main.yml b/roles/backups-cleanup-timer/meta/main.yml new file mode 100644 index 00000000..1fde040a --- /dev/null +++ b/roles/backups-cleanup-timer/meta/main.yml @@ -0,0 +1,2 @@ +dependencies: + - backups-cleanup-service diff --git a/roles/independent_backups-cleanup-timer/tasks/main.yml b/roles/backups-cleanup-timer/tasks/main.yml similarity index 100% rename from roles/independent_backups-cleanup-timer/tasks/main.yml rename to roles/backups-cleanup-timer/tasks/main.yml diff --git a/roles/independent_backups-cleanup-timer/templates/backups-cleanup.timer.j2 b/roles/backups-cleanup-timer/templates/backups-cleanup.timer.j2 similarity index 100% rename from roles/independent_backups-cleanup-timer/templates/backups-cleanup.timer.j2 rename to roles/backups-cleanup-timer/templates/backups-cleanup.timer.j2 diff --git a/roles/client_application-wireguard/meta/main.yml b/roles/client_application-wireguard/meta/main.yml index 47d5b8da..ec446b54 100644 --- a/roles/client_application-wireguard/meta/main.yml +++ b/roles/client_application-wireguard/meta/main.yml @@ -1,2 +1,2 @@ dependencies: -- independent_application-wireguard \ No newline at end of file +- application-wireguard \ No newline at end of file diff --git a/roles/independent_backup-to-usb/meta/main.yml b/roles/independent_backup-to-usb/meta/main.yml deleted file mode 100644 index 3c52d866..00000000 --- a/roles/independent_backup-to-usb/meta/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -dependencies: - - role: independent_backups-cleanup-service diff --git a/roles/independent_backups-cleanup-timer/README.md b/roles/independent_backups-cleanup-timer/README.md deleted file mode 100644 index 657baa0f..00000000 --- a/roles/independent_backups-cleanup-timer/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# role independent_backups-cleanup-timer - -Timer for cleaning up old backups \ No newline at end of file diff --git a/roles/independent_backups-cleanup-timer/meta/main.yml b/roles/independent_backups-cleanup-timer/meta/main.yml deleted file mode 100644 index a5e6b7a1..00000000 --- a/roles/independent_backups-cleanup-timer/meta/main.yml +++ /dev/null @@ -1,2 +0,0 @@ -dependencies: - - independent_backups-cleanup-service diff --git a/roles/independent_system-update/meta/main.yml b/roles/independent_system-update/meta/main.yml deleted file mode 100644 index ac09ce80..00000000 --- a/roles/independent_system-update/meta/main.yml +++ /dev/null @@ -1,3 +0,0 @@ -dependencies: - - { role: independent_system-pacman, when: ansible_distribution == 'Archlinux' } - - { role: independent_system-apt-update, when: ansible_distribution == "Debian" } diff --git a/roles/native-backups-consumer/meta/main.yml b/roles/native-backups-consumer/meta/main.yml index c2e590a8..08361544 100644 --- a/roles/native-backups-consumer/meta/main.yml +++ b/roles/native-backups-consumer/meta/main.yml @@ -1,4 +1,4 @@ dependencies: - native-git - systemd_notifier - - independent_backups-cleanup-timer + - backups-cleanup-timer diff --git a/roles/native-backups-provider/meta/main.yml b/roles/native-backups-provider/meta/main.yml index af5530bf..6eead035 100644 --- a/roles/native-backups-provider/meta/main.yml +++ b/roles/native-backups-provider/meta/main.yml @@ -1,3 +1,3 @@ dependencies: - native-backups-provider-user -- independent_backups-cleanup-timer +- backups-cleanup-timer diff --git a/roles/independent_system-apt-update/README.md b/roles/system-apt-update/README.md similarity index 80% rename from roles/independent_system-apt-update/README.md rename to roles/system-apt-update/README.md index 0e70a21f..0aa5d54c 100644 --- a/roles/independent_system-apt-update/README.md +++ b/roles/system-apt-update/README.md @@ -1,4 +1,4 @@ -# role independent_system-apt-update +# role system-apt-update This role updates the packages # upgrade diff --git a/roles/independent_system-apt-update/tasks/main.yml b/roles/system-apt-update/tasks/main.yml similarity index 100% rename from roles/independent_system-apt-update/tasks/main.yml rename to roles/system-apt-update/tasks/main.yml diff --git a/roles/independent_system-pacman/tasks/main.yml b/roles/system-pacman/tasks/main.yml similarity index 100% rename from roles/independent_system-pacman/tasks/main.yml rename to roles/system-pacman/tasks/main.yml diff --git a/roles/system-update/meta/main.yml b/roles/system-update/meta/main.yml new file mode 100644 index 00000000..064fadd0 --- /dev/null +++ b/roles/system-update/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - { role: system-pacman, when: ansible_distribution == 'Archlinux' } + - { role: system-apt-update, when: ansible_distribution == "Debian" }