From e9e609e89ad879e10e58f2c4fcfa572f60d6dfad Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Wed, 10 Sep 2025 17:52:58 +0200 Subject: Refactor role dependencies to be more module modular This modularity means that each role can be installed in a playbook by itself as long as the other roles exist around it. This also straps the ensure dependency packages exist in any of the roles tasks, they should be moved to their own roles and configured properly if needed. --- roles/wg_portal/meta/main.yml | 24 ++++++++++++++++++++++++ roles/wg_portal/tasks/main.yml | 8 -------- 2 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 roles/wg_portal/meta/main.yml (limited to 'roles/wg_portal') diff --git a/roles/wg_portal/meta/main.yml b/roles/wg_portal/meta/main.yml new file mode 100644 index 00000000..fa382c2d --- /dev/null +++ b/roles/wg_portal/meta/main.yml @@ -0,0 +1,24 @@ +--- +dependencies: + # These dependencies are used in the install/uninstall script + - role: "bash" + - role: "systemd" + - role: "sudo" + - role: "curl" + - role: "acl" +galaxy_info: + author: "a14m" + description: "Install and configure wg-portal VPN web interface manager" + company: "kartoffeln.work GmbH." + license: "MIT" + min_ansible_version: "2.18" + platforms: + - name: "ArchLinux" + versions: + - "all" + - name: "Ubuntu" + versions: + - "noble" + - name: "Debian" + versions: + - "bookworm" diff --git a/roles/wg_portal/tasks/main.yml b/roles/wg_portal/tasks/main.yml index 87c234e1..2c167f66 100644 --- a/roles/wg_portal/tasks/main.yml +++ b/roles/wg_portal/tasks/main.yml @@ -1,12 +1,4 @@ --- -- name: "Ensure wg-portal dependencies are installed" - become: true - ansible.builtin.package: - name: - - curl - - sudo - - acl - - name: "Create wg-portal user" become: true ansible.builtin.user: -- cgit v1.2.3