You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 line
2.4KB

  1. ---
  2. - setup:
  3. gather_subset: '!all'
  4. - name: install apt packages
  5. apt:
  6. pkg: "{{ item }}"
  7. state: installed
  8. with_items:
  9. - live-build
  10. - memtest86
  11. - memtest86+
  12. - name: debian live-build directory
  13. file:
  14. path: "{{ live_build_directory }}"
  15. state: directory
  16. - name: remove config directory
  17. file:
  18. path: "{{ live_build_directory }}/config"
  19. state: absent
  20. - name: lb clean
  21. command:
  22. lb clean
  23. args:
  24. chdir: "{{ live_build_directory }}"
  25. - name: lb config
  26. command:
  27. lb config
  28. {{ lookup('template','lb-config-args.j2') }}
  29. args:
  30. chdir: "{{ live_build_directory }}"
  31. - name: root user
  32. import_role:
  33. name: root_user
  34. vars:
  35. root_target_directory: "{{ live_build_directory }}/config/includes.chroot/"
  36. - name: include common packages
  37. template:
  38. src: common.list.chroot.j2
  39. dest: "{{ live_build_directory }}/config/package-lists/common.list.chroot"
  40. - name: include desktop packages
  41. template:
  42. src: desktop.list.chroot.j2
  43. dest: "{{ live_build_directory }}/config/package-lists/desktop.list.chroot"
  44. - name: include custom packages
  45. template:
  46. src: custom.list.chroot.j2
  47. dest: "{{ live_build_directory }}/config/package-lists/custom.list.chroot"
  48. when: live_build_custom_packages is defined
  49. - name: debian-installer installer includes directory
  50. file:
  51. path: "{{ live_build_directory }}/config/includes.installer"
  52. state: directory
  53. - name: debian-installer preseed
  54. template:
  55. src: preseed.cfg.j2
  56. dest: "{{ live_build_directory }}/config/includes.installer/preseed.cfg"
  57. - name: lb bootstrap (first build stage)
  58. command: lb bootstrap
  59. args:
  60. chdir: "{{ live_build_directory }}"
  61. register: _lb_bootstrap
  62. - name: lb chroot (second build stage)
  63. command: lb chroot
  64. args:
  65. chdir: "{{ live_build_directory }}"
  66. register: _lb_chroot
  67. - name: lb installer (third build stage)
  68. command: lb installer
  69. args:
  70. chdir: "{{ live_build_directory }}"
  71. register: _lb_installer
  72. - name: lb binary (fourth build stage)
  73. command: lb binary
  74. args:
  75. chdir: "{{ live_build_directory }}"
  76. register: _lb_binary
  77. #- name: lb source (fifth build stage)
  78. # command: lb source
  79. # args:
  80. # chdir: "{{ live_source_directory }}"
  81. # register: _lb_source
  82. #- name: lb build
  83. # command: lb build
  84. # args:
  85. # chdir: "{{ live_build_directory }}"
  86. # register: _lb_build
  87. #
  88. #- name: save build log
  89. # copy:
  90. # content: "{{ _lb_build.stdout }}"
  91. # dest: "{{ live_build_directory }}/build.log"