From 21d259bbf44138ea37d66719e26c290de59cbbef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Mon, 1 Jul 2024 13:41:46 +0200 Subject: refactor(roles/nextcloud): move dependencies in subtask --- roles/nextcloud/tasks/dependencies.yml | 36 ++++++++++++++++++++++++++++++++++ roles/nextcloud/tasks/main.yml | 22 ++++----------------- 2 files changed, 40 insertions(+), 18 deletions(-) create mode 100644 roles/nextcloud/tasks/dependencies.yml (limited to 'roles/nextcloud/tasks') diff --git a/roles/nextcloud/tasks/dependencies.yml b/roles/nextcloud/tasks/dependencies.yml new file mode 100644 index 0000000..923aa45 --- /dev/null +++ b/roles/nextcloud/tasks/dependencies.yml @@ -0,0 +1,36 @@ +--- + +- name: copy dependencies binaries to chroot + ansible.builtin.include_role: + name: copy_bin + vars: + copy_bin__root_dir: "{{ httpd_pre__chroot_dir }}" + copy_bin__name: "{{ nextcloud__loop_dependencies_item }}" + loop_control: + loop_var: nextcloud__loop_dependencies_item + loop: + - ffmpeg + - ffprobe + - perl + +- name: copy dependencies for exiftool + ansible.builtin.copy: + src: /usr/local/bin/exiftool + dest: "{{ httpd_pre__chroot_dir }}/bin/exiftool" + mode: preserve + remote_src: true + +- name: create perl dependencies directory + ansible.builtin.file: + path: "{{ httpd_pre__chroot_dir }}/{{ nextcloud__perl_libdata_dir | dirname }}" + owner: 0 + group: 0 + mode: "0755" + state: directory + +- name: copy perl dependencies + ansible.builtin.copy: + src: "{{ nextcloud__perl_libdata_dir }}" + dest: "{{ httpd_pre__chroot_dir }}/{{ nextcloud__perl_libdata_dir | dirname }}" + mode: preserve + remote_src: true diff --git a/roles/nextcloud/tasks/main.yml b/roles/nextcloud/tasks/main.yml index 2a950c4..6eb5d21 100644 --- a/roles/nextcloud/tasks/main.yml +++ b/roles/nextcloud/tasks/main.yml @@ -48,6 +48,10 @@ ansible.builtin.import_tasks: file: php.yml +- name: import dependencies tasks + ansible.builtin.import_tasks: + file: dependencies.yml + - name: import database tasks ansible.builtin.import_tasks: file: database.yml @@ -82,21 +86,3 @@ owner: 0 group: 0 mode: "0644" - -- name: copy dependencies binaries to chroot - ansible.builtin.include_role: - name: copy_bin - vars: - copy_bin__root_dir: "{{ httpd_pre__chroot_dir }}" - copy_bin__name: "{{ item }}" - loop: - - ffmpeg - - ffprobe - - perl - -- name: copy dependencies for lowdown - ansible.builtin.copy: - src: /usr/local/bin/exiftool - dest: "{{ httpd_pre__chroot_dir }}/bin/exiftool" - mode: preserve - remote_src: true -- cgit v1.2.3