summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2020-05-14 15:42:43 +0200
committerJonathan Bauer2020-05-14 15:42:43 +0200
commit1bd47e7f929e64bf1ffd6c37df6f1aea176f3a35 (patch)
tree550a174e22841eab0a2f396ce4b74d20467683c9
parenttasks/distro/Ubuntu-18.yml: use apt... (diff)
downloadansible-dracut-1bd47e7f929e64bf1ffd6c37df6f1aea176f3a35.tar.gz
ansible-dracut-1bd47e7f929e64bf1ffd6c37df6f1aea176f3a35.tar.xz
ansible-dracut-1bd47e7f929e64bf1ffd6c37df6f1aea176f3a35.zip
update to new downloader scheme
-rw-r--r--slx-builder/tasks/install.yml46
-rw-r--r--slx-builder/vars/distro/CentOS-7.yml1
-rw-r--r--slx-builder/vars/distro/CentOS-8.yml1
-rw-r--r--slx-builder/vars/distro/Ubuntu-18.yml1
-rw-r--r--slx-builder/vars/main.yml7
5 files changed, 23 insertions, 33 deletions
diff --git a/slx-builder/tasks/install.yml b/slx-builder/tasks/install.yml
index 08886f7..b31eef3 100644
--- a/slx-builder/tasks/install.yml
+++ b/slx-builder/tasks/install.yml
@@ -1,42 +1,30 @@
---
- name: OpenSLX dracut | Create download destination directory
file:
- path: "{{ builder_dir }}"
+ path: "{{ builder_path | dirname }}"
state: directory
-- name: OpenSLX dracut | Copy downloader bootstrap script
- copy:
- remote_src: no
- src: "get_builder.sh"
- dest: "{{ builder_dir }}"
+- name: OpenSLX dracut | Get bootstrap script (build-initramfs.sh)
+ get_url:
+ url: "{{ builder_url }}"
+ dest: "{{ builder_path }}"
mode: 0550
-- debug:
- msg: "Searching for: downloader_env/{{ ansible_distribution }}-{{ ansible_distribution_version}} | downloader_env/{{ ansible_distribution }}-{{ ansible_distribution_major_version}} | downloader_env/{{ ansible_distribution }}"
-
-- name: OpenSLX dracut | Copy env file for downloader
- template:
- src: "{{ item }}"
- dest: "{{ builder_dir }}/build_versions"
- with_first_found:
- - "files/downloader_env/{{ ansible_distribution }}-{{ ansible_distribution_version}}"
- - "files/downloader_env/{{ ansible_distribution }}-{{ ansible_distribution_major_version}}"
- - "files/downloader_env/{{ ansible_distribution }}"
-
-- name: OpenSLX dracut | Get bootstrap
- shell: "{{ builder_dir }}/get_builder.sh"
- args:
- chdir: "{{ builder_dir }}"
- creates: "${{ builder_dir }}/systemd_init"
-
- name: OpenSLX dracut | Get distro specific tasks
include_tasks: "{{ item }}"
with_first_found:
- - "tasks/distro/{{ ansible_distribution }}-{{ ansible_distribution_version}}.yml"
- - "tasks/distro/{{ ansible_distribution }}-{{ ansible_distribution_major_version}}.yml"
- - "tasks/distro/{{ ansible_distribution }}.yml"
+ - "tasks/distro/{{ ansible_distribution }}-{{ ansible_distribution_version}}.yml"
+ - "tasks/distro/{{ ansible_distribution }}-{{ ansible_distribution_major_version}}.yml"
+ - "tasks/distro/{{ ansible_distribution }}.yml"
+
+- name: OpenSLX dracut | Include distro variables
+ include_vars: "{{ item }}"
+ with_first_found:
+ - "vars/distro/{{ ansible_distribution }}-{{ ansible_distribution_version}}.yml"
+ - "vars/distro/{{ ansible_distribution }}-{{ ansible_distribution_major_version}}.yml"
+ - "vars/distro/{{ ansible_distribution }}.yml"
- name: OpenSLX dracut | Initialize repository
- shell: "{{ builder_path }} --init"
+ shell: "{{ builder_path }} --init --debug {{ builder_extra_args }}"
args:
- creates: "${{ builder_dir }}/systemd_init/builder/dracut/dracut.sh"
+ creates: "${{ builder_path | dirname }}/dracut/dracut.sh"
diff --git a/slx-builder/vars/distro/CentOS-7.yml b/slx-builder/vars/distro/CentOS-7.yml
new file mode 100644
index 0000000..7b188d9
--- /dev/null
+++ b/slx-builder/vars/distro/CentOS-7.yml
@@ -0,0 +1 @@
+builder_extra_args="-q xmount"
diff --git a/slx-builder/vars/distro/CentOS-8.yml b/slx-builder/vars/distro/CentOS-8.yml
new file mode 100644
index 0000000..74cdd04
--- /dev/null
+++ b/slx-builder/vars/distro/CentOS-8.yml
@@ -0,0 +1 @@
+builder_extra_args="--override-module module_dnbd3.url=git://git.openslx.org/dnbd3-ng.git --override-module module_dnbd3.commit=b57dadc2d - --omit-driver loop"
diff --git a/slx-builder/vars/distro/Ubuntu-18.yml b/slx-builder/vars/distro/Ubuntu-18.yml
new file mode 100644
index 0000000..556df42
--- /dev/null
+++ b/slx-builder/vars/distro/Ubuntu-18.yml
@@ -0,0 +1 @@
+# nothing
diff --git a/slx-builder/vars/main.yml b/slx-builder/vars/main.yml
index fc56740..b5e01b9 100644
--- a/slx-builder/vars/main.yml
+++ b/slx-builder/vars/main.yml
@@ -1,5 +1,4 @@
-builder_branch: "nobash"
-builder_url: "http://git.openslx.org/openslx-ng/systemd-init.git/plain/builder/build-initramfs.sh?h={{ builder_branch }}"
-builder_path: "/opt/openslx/systemd-init/builder/build-initramfs.sh"
-builder_dir: "/opt/openslx/"
+builder_branch: "downloader"
+builder_url: "http://git.openslx.org/openslx-ng/systemd-init.git/plain/build-initramfs.sh?h={{ builder_branch }}"
+builder_path: "/opt/systemd-init/build-initramfs.sh"
builder_target: "{{ builder_path | dirname }}/initramfs"