blob: 844094377a731763830b8ef79ee491b3ea6eba7d (
plain) (
tree)
|
|
---
- name: mltk | Install git
package:
name: git
state: present
- name: mltk | Checkout repository
git:
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
|