|
- ---
-
- - 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"
- state: absent
-
- - name: lb clean
- command:
- lb clean
- args:
- chdir: "{{ live_build_directory }}"
-
- - name: lb config
- command:
- lb config
- {{ lookup('template','lb-config-args.j2') }}
- args:
- chdir: "{{ live_build_directory }}"
-
- - name: ssh root access
- include_role:
- name: ssh_root_access
- vars:
- root_target_directory: "{{ live_build_directory }}/config/includes.chroot/"
-
- - name: keyboard configuration
- include_role:
- name: keyboard_configuration
- vars:
- root_target_directory: "{{ live_build_directory }}/config/includes.chroot/"
- when: live_build_serial_console == false
-
- - name: systemd network config directory
- file:
- path: "{{ live_build_directory }}/config/includes.chroot/etc/systemd/network"
- state: directory
-
- - name: name policy for predictable interface names with virtio to mac
- template:
- src: virtio.link.j2
- dest: "{{ live_build_directory }}/config/includes.chroot/etc/systemd/network/20-virtio.link"
-
- - name: include common packages
- template:
- src: common.list.chroot.j2
- dest: "{{ live_build_directory }}/config/package-lists/common.list.chroot"
-
- - name: include console-setup package
- copy:
- content: console-setup
- dest: "{{ live_build_directory }}/config/package-lists/console-setup.list.chroot"
- when: live_build_serial_console == false
-
- - name: include custom packages
- template:
- src: custom.list.chroot.j2
- dest: "{{ live_build_directory }}/config/package-lists/custom.list.chroot"
- when: live_build_custom_packages is defined
-
- - name: isolinx directory
- file:
- path: "{{ live_build_directory }}/config/includes.binary/isolinux"
- state: directory
-
- - name: isolinux.cfg
- template:
- src: isolinux.cfg.j2
- dest: "{{ live_build_directory }}/config/includes.binary/isolinux/isolinux.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"
|