summaryrefslogtreecommitdiff
path: root/roles/install-custom-packages/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/install-custom-packages/tasks')
-rw-r--r--roles/install-custom-packages/tasks/main.yml13
1 files changed, 3 insertions, 10 deletions
diff --git a/roles/install-custom-packages/tasks/main.yml b/roles/install-custom-packages/tasks/main.yml
index 1d8cd47..9b495c9 100644
--- a/roles/install-custom-packages/tasks/main.yml
+++ b/roles/install-custom-packages/tasks/main.yml
@@ -1,7 +1,3 @@
-- name: Get Debian version
- become: true
- command: chroot {{ vyos_install_root }} awk 'match($0, /VERSION=.*\((\w+)\)/, version) { print version[1] }' /etc/os-release
- register: debian_version
- name: Set VyOS branch name crux
set_fact:
vyos_branch: "crux"
@@ -33,13 +29,10 @@
dest: "{{ vyos_install_root }}/tmp/custom_debs/"
- name: Install custom packages from a list
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: Check if custom debs directory exists
- stat:
- path: "{{ vyos_install_root }}/tmp/custom_debs/"
- register: custom_debs_dir
- name: Install custom packages from deb files
- command: chroot {{ vyos_install_root }} dpkg -i --force-depends -R /tmp/custom_debs/
- when: custom_debs_dir.stat.exists
+ command:
+ cmd: "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
command: chroot {{ vyos_install_root }} apt-get -f -y install
- name: Delete DEB packages