diff --git a/defaults/main.yml b/defaults/main.yml index 2d71e11..a809c35 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -25,8 +25,3 @@ live_build_iso_publisher: custom live_build_nice_level: 14 live_build_linux_surface: false - -live_build_common_packages: - - openssh-server - - python - - console-setup diff --git a/tasks/build.yaml b/tasks/build.yaml index 6dad300..b503982 100644 --- a/tasks/build.yaml +++ b/tasks/build.yaml @@ -15,6 +15,7 @@ args: chdir: "{{ live_build_directory }}" register: _lb_chroot + when: live_build_linux_surface - name: lb chroot (second build stage) command: diff --git a/tasks/config.yaml b/tasks/config.yaml index 7e58814..01cd0f8 100644 --- a/tasks/config.yaml +++ b/tasks/config.yaml @@ -56,34 +56,11 @@ args: chdir: "{{ live_build_directory }}" -- name: root user - import_role: - name: root_user - vars: - root_target_directory: "{{ live_build_directory }}/config/includes.chroot/" - -- name: include common packages - copy: "{{ live_build_common_packages | unique | join('\n') }}" - content: config/package-lists/common.list.chroot.j2 - dest: "{{ live_build_directory }}/config/package-lists/common.list.chroot" - -- name: include desktop packages +- name: include chroot packages copy: - content: "{{ live_build_desktop_packages | unique | join('\n') }}" - dest: "{{ live_build_directory }}/config/package-lists/desktop.list.chroot" - when: live_build_desktop - -- name: include debian-installer-launcher package - copy: - content: debian-installer-launcher - dest: "{{ live_build_directory }}/config/package-lists/debian-installer-launcher.list.chroot" - when: live_build_desktop - -- name: include custom packages - copy: - content: "{{ live_build_custom_packages | unique | join('\n') }}" - dest: "{{ live_build_directory }}/config/package-lists/custom.list.chroot" - when: live_build_custom_packages is defined + content: "{{ live_build_chroot_package_lists[item] | unique | join('\n') }}" + dest: "{{ live_build_directory }}/config/package-lists/{{ item }}.list.chroot" + loop: "{{ live_build_chroot_package_lists.keys() | list }}" - name: debian-installer installer includes directory file: @@ -100,3 +77,16 @@ src: linux-surface/ dest: "{{ live_build_directory }}" when: live_build_linux_surface + +- name: root user ssh directory + file: + path: "{{ live_build_directory }}/config/includes.chroot/root/.ssh" + state: directory + mode: 0700 + when: root_ssh_authorized_keys is defined + +- name: root user ssh authorized keys + copy: + content: "{{ root_ssh_authorized_keys | join('\n') }}" + dest: "{{ live_build_directory }}/config/includes.chroot/root/.ssh/authorized_keys" + when: root_ssh_authorized_keys is defined