summaryrefslogtreecommitdiffstats
path: root/mltk-bwlp
diff options
context:
space:
mode:
authorJonathan Bauer2021-05-19 10:13:49 +0200
committerJonathan Bauer2021-05-19 10:13:49 +0200
commit85a821af075d5edd19a813bdf78549271afed14b (patch)
tree60127cb57d0fe875f5c5b5f13649132584bd2173 /mltk-bwlp
parent[mltk-nvidia] update to new multi-version name (diff)
downloadansible-bwlp-85a821af075d5edd19a813bdf78549271afed14b.tar.gz
ansible-bwlp-85a821af075d5edd19a813bdf78549271afed14b.tar.xz
ansible-bwlp-85a821af075d5edd19a813bdf78549271afed14b.zip
[mltk-*] update core mltk roles
Diffstat (limited to 'mltk-bwlp')
-rw-r--r--mltk-bwlp/files/etc/apt/preferences.d/disable-distro-kernel-updates.pref11
-rw-r--r--mltk-bwlp/files/etc/profile.d/00-slx-env.sh1
-rw-r--r--mltk-bwlp/tasks/distro.yml15
-rw-r--r--mltk-bwlp/tasks/main.yml38
-rw-r--r--mltk-bwlp/templates/kernel.j23
5 files changed, 47 insertions, 21 deletions
diff --git a/mltk-bwlp/files/etc/apt/preferences.d/disable-distro-kernel-updates.pref b/mltk-bwlp/files/etc/apt/preferences.d/disable-distro-kernel-updates.pref
new file mode 100644
index 0000000..9cae92d
--- /dev/null
+++ b/mltk-bwlp/files/etc/apt/preferences.d/disable-distro-kernel-updates.pref
@@ -0,0 +1,11 @@
+Package: linux-generic
+Pin: release o=Ubuntu
+Pin-Priority: 1
+
+Package: linux-image-generic
+Pin: release o=Ubuntu
+Pin-Priority: 1
+
+Package: linux-headers-generic
+Pin: release o=Ubuntu
+Pin-Priority: 1
diff --git a/mltk-bwlp/files/etc/profile.d/00-slx-env.sh b/mltk-bwlp/files/etc/profile.d/00-slx-env.sh
new file mode 100644
index 0000000..0991c7e
--- /dev/null
+++ b/mltk-bwlp/files/etc/profile.d/00-slx-env.sh
@@ -0,0 +1 @@
+export PATH="$PATH:/opt/openslx/sbin:/opt/openslx/bin"
diff --git a/mltk-bwlp/tasks/distro.yml b/mltk-bwlp/tasks/distro.yml
deleted file mode 100644
index 1db174d..0000000
--- a/mltk-bwlp/tasks/distro.yml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-# TODO other distros if needed
-- set_fact:
- pkgnames:
- - build-essential
- - automake
- - cmake
- - lsof
- - m4
- - rsync
- - pkg-config
- - xserver-xorg
- when:
- - ansible_distribution == "Ubuntu"
-# TODO QT
diff --git a/mltk-bwlp/tasks/main.yml b/mltk-bwlp/tasks/main.yml
index e6e7cf7..55cffcd 100644
--- a/mltk-bwlp/tasks/main.yml
+++ b/mltk-bwlp/tasks/main.yml
@@ -1,11 +1,37 @@
---
-- import_tasks: tasks/distro.yml
-
- name: mltk | Install dependencies
package:
- name: "{{ item }}"
+ name: "{{ mltk_deps }}"
state: present
- with_items: "{{ pkgnames }}"
+ vars:
+ mltk_deps:
+ - build-essential
+ - automake
+ - cmake
+ - lsof
+ - m4
+ - rsync
+ - pkg-config
+ - xserver-xorg
+
+- name: mltk | Process kernel version if specified
+ replace:
+ path: "{{ mltk_git_target }}/core/modules/kernel-vanilla/module.conf"
+ regexp: '^(REQUIRED_KERNEL=).*'
+ replace: '\1"{{ kernel_version }}"'
+ when: kernel_version is defined
+
+- name: mltk | Build and install stage4-bwlp target
+ shell: "{{ mltk_git_target }}/mltk stage4 -b -i"
+
+- name: mltk | Save kernel to /.kernel
+ template:
+ src: "templates/kernel.j2"
+ dest: "/.kernel"
+ when: kernel_version is defined
-- name: mltk | Build and install bwlp target
- shell: "{{ mltk_git_target }}/mltk bwlp -b -i"
+- name: Copy static files
+ copy:
+ src: files/
+ dest: /
+ become: yes
diff --git a/mltk-bwlp/templates/kernel.j2 b/mltk-bwlp/templates/kernel.j2
new file mode 100644
index 0000000..57e5dc1
--- /dev/null
+++ b/mltk-bwlp/templates/kernel.j2
@@ -0,0 +1,3 @@
+version={{ kernel_version }}-openslx+
+path={{ mltk_git_target }}/var/builds/kernel/kernel
+src={{ mltk_git_target }}/tmp/work/kernel/ksrc