From 15cdbc6725da958e5d4bc002005bd5c7d99ebe67 Mon Sep 17 00:00:00 2001 From: doobry Date: Fri, 27 Sep 2024 23:42:24 +0200 Subject: [PATCH] Add support to install extra plugins from local sources --- defaults/main.yml | 4 ++++ tasks/extra-plugins.yml | 10 ++++++++++ tasks/main.yml | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100644 tasks/extra-plugins.yml diff --git a/defaults/main.yml b/defaults/main.yml index a40fdf4..c86a52e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -36,6 +36,10 @@ roundcube_plugins: - managesieve - zipdownload +# extra plugins to be copied from local sources +# roundcube_plugins_extra: +# - example_plugin + # list of additional configs, e.g. for plugins roundcube_configs_extra: - plugins/enigma/config.inc.php diff --git a/tasks/extra-plugins.yml b/tasks/extra-plugins.yml new file mode 100644 index 0000000..fc3a293 --- /dev/null +++ b/tasks/extra-plugins.yml @@ -0,0 +1,10 @@ +--- + +- name: "Copy plugin directory of {{ item }}" + ansible.builtin.copy: + src: "roundcube/extra-plugins/{{ item }}" + dest: "{{ roundcube_working_dir }}/current/plugins/" + owner: "{{ roundcube_user }}" + group: "{{ roundcube_group }}" + mode: 0644 + directory_mode: 0755 diff --git a/tasks/main.yml b/tasks/main.yml index 81c6b0b..267cff1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -164,6 +164,13 @@ tags: - getmail +- name: Import extra plugin tasks + ansible.builtin.include_tasks: extra-plugins.yml + when: "roundcube_plugins_extra is defined" + loop: "{{ roundcube_plugins_extra }}" + tags: + - extra-plugins + - name: Ensure the installer directory is deleted ansible.builtin.file: path: "{{ roundcube_working_dir }}/current/installer"