From d571c6fe4498b0ad29dbb98c43958abdb595080f Mon Sep 17 00:00:00 2001 From: Markus Brechtel Date: Fri, 28 Sep 2018 11:36:04 +0200 Subject: [PATCH] new tasks structure --- tasks/build.yaml | 42 ++++++++++++++++++++++++ tasks/{main.yml => config.yaml} | 58 --------------------------------- tasks/main.yaml | 11 +++++++ tasks/setup.yaml | 9 +++++ 4 files changed, 62 insertions(+), 58 deletions(-) create mode 100644 tasks/build.yaml rename tasks/{main.yml => config.yaml} (51%) create mode 100644 tasks/main.yaml create mode 100644 tasks/setup.yaml diff --git a/tasks/build.yaml b/tasks/build.yaml new file mode 100644 index 0000000..c600108 --- /dev/null +++ b/tasks/build.yaml @@ -0,0 +1,42 @@ +--- + +- name: lb bootstrap (first build stage) + command: lb bootstrap + args: + chdir: "{{ live_build_directory }}" + register: _lb_bootstrap + +- name: lb chroot (second build stage) + command: lb chroot + args: + chdir: "{{ live_build_directory }}" + register: _lb_chroot + +- name: lb installer (third build stage) + command: lb installer + args: + chdir: "{{ live_build_directory }}" + register: _lb_installer + +- name: lb binary (fourth build stage) + command: lb binary + args: + chdir: "{{ live_build_directory }}" + register: _lb_binary + +#- name: lb source (fifth build stage) +# command: lb source +# args: +# chdir: "{{ live_source_directory }}" +# register: _lb_source + +#- name: lb build +# command: lb build +# args: +# chdir: "{{ live_build_directory }}" +# register: _lb_build +# +#- name: save build log +# copy: +# content: "{{ _lb_build.stdout }}" +# dest: "{{ live_build_directory }}/build.log" diff --git a/tasks/main.yml b/tasks/config.yaml similarity index 51% rename from tasks/main.yml rename to tasks/config.yaml index 4fd7992..504c39f 100644 --- a/tasks/main.yml +++ b/tasks/config.yaml @@ -1,22 +1,5 @@ --- -- setup: - gather_subset: '!all' - -- name: install apt packages - apt: - pkg: "{{ item }}" - state: installed - with_items: - - live-build - - memtest86 - - memtest86+ - -- name: debian live-build directory - file: - path: "{{ live_build_directory }}" - state: directory - - name: remove config directory file: path: "{{ live_build_directory }}/config" @@ -66,44 +49,3 @@ template: src: preseed.cfg.j2 dest: "{{ live_build_directory }}/config/includes.installer/preseed.cfg" - -- name: lb bootstrap (first build stage) - command: lb bootstrap - args: - chdir: "{{ live_build_directory }}" - register: _lb_bootstrap - -- name: lb chroot (second build stage) - command: lb chroot - args: - chdir: "{{ live_build_directory }}" - register: _lb_chroot - -- name: lb installer (third build stage) - command: lb installer - args: - chdir: "{{ live_build_directory }}" - register: _lb_installer - -- name: lb binary (fourth build stage) - command: lb binary - args: - chdir: "{{ live_build_directory }}" - register: _lb_binary - -#- name: lb source (fifth build stage) -# command: lb source -# args: -# chdir: "{{ live_source_directory }}" -# register: _lb_source - -#- name: lb build -# command: lb build -# args: -# chdir: "{{ live_build_directory }}" -# register: _lb_build -# -#- name: save build log -# copy: -# content: "{{ _lb_build.stdout }}" -# dest: "{{ live_build_directory }}/build.log" diff --git a/tasks/main.yaml b/tasks/main.yaml new file mode 100644 index 0000000..a4b86e8 --- /dev/null +++ b/tasks/main.yaml @@ -0,0 +1,11 @@ +--- + +- import_tasks: setup.yaml + +- name: debian live-build directory + file: + path: "{{ live_build_directory }}" + state: directory + +- import_tasks: config.yaml +- import_tasks: build.yaml diff --git a/tasks/setup.yaml b/tasks/setup.yaml new file mode 100644 index 0000000..3d3d839 --- /dev/null +++ b/tasks/setup.yaml @@ -0,0 +1,9 @@ +--- +- name: install apt packages + apt: + pkg: "{{ item }}" + state: installed + with_items: + - live-build + - memtest86 + - memtest86+