From 85a821af075d5edd19a813bdf78549271afed14b Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Wed, 19 May 2021 10:13:49 +0200 Subject: [mltk-*] update core mltk roles --- mltk-core/tasks/main.yml | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) (limited to 'mltk-core/tasks/main.yml') diff --git a/mltk-core/tasks/main.yml b/mltk-core/tasks/main.yml index 95a7cd7..8440943 100644 --- a/mltk-core/tasks/main.yml +++ b/mltk-core/tasks/main.yml @@ -1,6 +1,4 @@ --- -- import_tasks: tasks/repo.yml - - name: mltk | Install git package: name: git @@ -11,4 +9,43 @@ repo: "{{ mltk_git_source }}" dest: "{{ mltk_git_target }}" version: "{{ mltk_git_branch }}" + force: yes + update: yes depth: 1 + +- name: mltk | Create mltk configuration file + template: + src: templates/mltk-config.j2 + dest: "{{ mltk_git_target }}/config" + +- name: mltk | Patch virtualbox version + replace: + path: "{{ mltk_git_target }}/core/modules/vbox-src/module.conf" + regexp: '^(REQUIRED_VBOX_VERSION=).*' + replace: '\g<1>{{ mltk_vbox_version }}' + +- name: mltk | Patch vmware16 version + replace: + path: "{{ mltk_git_target }}/core/modules/vmware16/module.conf" + regexp: '^(REQUIRED_VERSION=).*' + replace: '\g<1>{{ mltk_vmware_version }}' + +- name: mltk | HACKS patch packagemanager.inc to prevent installing recommended packages + replace: + path: "{{ mltk_git_target }}/core/includes/packagemanager.inc" + regexp: '(apt-get install) (-y \${PKG})' + replace: '\1 --no-install-recommends \2' + +- name: mltk | HACKS patch chroot.inc to include the build environment mount point + replace: + path: "{{ mltk_git_target }}/core/includes/chroot.inc" + regexp: '^(declare -rg CHROOT_BINDMOUNTS=")(/dev[^"]+")' + replace: '\1/opt/build-env \2' + +- name: mltk | Distro-specific tasks + include_tasks: "{{ item }}" + with_first_found: + - "{{ role_path }}/tasks/distro/{{ ansible_distribution }}-{{ ansible_distribution_version}}.yml" + - "{{ role_path }}/tasks/distro/{{ ansible_distribution }}-{{ ansible_distribution_major_version}}.yml" + - "{{ role_path }}/tasks/distro/{{ ansible_distribution }}.yml" + ignore_errors: yes -- cgit v1.2.3-55-g7522