- 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