diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2024-07-01 13:41:46 +0200 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2024-07-01 13:41:46 +0200 |
commit | 21d259bbf44138ea37d66719e26c290de59cbbef (patch) | |
tree | af46d5bd2779b04974e3276adb48f3c7fb6e72ab /roles/nextcloud/tasks | |
parent | cd9298a427aa7f17734d0ffd732d5e1ec2815231 (diff) | |
download | rules-21d259bbf44138ea37d66719e26c290de59cbbef.tar.gz |
refactor(roles/nextcloud): move dependencies in subtask
Diffstat (limited to 'roles/nextcloud/tasks')
-rw-r--r-- | roles/nextcloud/tasks/dependencies.yml | 36 | ||||
-rw-r--r-- | roles/nextcloud/tasks/main.yml | 22 |
2 files changed, 40 insertions, 18 deletions
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 |