From 680a2b4b8d22b8e76fee62d1474b23cd7915c64b Mon Sep 17 00:00:00 2001 From: Kim Date: Mon, 28 Jun 2021 16:02:54 +0200 Subject: fix errors in custom package install --- roles/install-custom-packages/tasks/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/install-custom-packages/tasks/main.yml b/roles/install-custom-packages/tasks/main.yml index 9b495c9..de7ef26 100644 --- a/roles/install-custom-packages/tasks/main.yml +++ b/roles/install-custom-packages/tasks/main.yml @@ -28,14 +28,18 @@ src: "files/custom_debs/" dest: "{{ vyos_install_root }}/tmp/custom_debs/" - name: Install custom packages from a list + become: true command: chroot {{ vyos_install_root }} apt-get -t {{ vyos_branch | default('current') }} install -y --no-install-recommends {{ lookup('file', 'files/custom_packages_list.txt') }} - name: Install custom packages from deb files command: - cmd: "chroot {{ vyos_install_root }} dpkg -i --force-depends /tmp/custom_debs/{{ item | basename }}" + become: true + command: chroot {{ vyos_install_root }} dpkg -i --force-depends /tmp/custom_debs/{{ item | basename }} with_fileglob: "{{ vyos_install_root }}/tmp/custom_debs/*.deb" - name: Install missed dependencies + become: true command: chroot {{ vyos_install_root }} apt-get -f -y install - name: Delete DEB packages + become: true command: chroot {{ vyos_install_root }} rm -rf /tmp/custom_debs/ - name: apt-get clean become: true -- cgit v1.2.3