From 4a16c10dd3b870ce62fdae9b590ff207e30a2bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sun, 12 Dec 2021 14:51:24 +0000 Subject: roles/cgit: Move lowdown + dependencies to chroot --- roles/cgit/tasks/dependencies.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 roles/cgit/tasks/dependencies.yml (limited to 'roles/cgit/tasks/dependencies.yml') diff --git a/roles/cgit/tasks/dependencies.yml b/roles/cgit/tasks/dependencies.yml new file mode 100644 index 0000000..41f0884 --- /dev/null +++ b/roles/cgit/tasks/dependencies.yml @@ -0,0 +1,31 @@ +- name: retrieve dependencies for lowdown + shell: ldd /usr/local/bin/lowdown | tr -s " " | grep "0 1 0" | cut -d " " -f 7 + register: result + +- name: create dependencies directories in chroot + file: + path: "{{ cgit_chroot_dir }}{{ item | dirname }}" + owner: 0 + group: 0 + mode: 0755 + state: directory + loop: "{{ result.stdout_lines }}" + +- name: copy dependencies for lowdown + copy: + src: "{{ item }}" + dest: "{{ cgit_chroot_dir }}/{{ item }}" + mode: preserve + remote_src: true + loop: "{{ result.stdout_lines }}" + +- name: copy utilities in httpd chroot + copy: + src: "{{ item }}" + dest: "{{ cgit_chroot_dir }}/bin" + mode: preserve + remote_src: true + loop: + - /bin/sh + - /bin/cat + - /usr/local/bin/lowdown -- cgit v1.2.3