Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

131 lines
2.9KB

  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. include_role:
  33. name: root_user
  34. vars:
  35. root_target_directory: "{{ live_build_directory }}/config/includes.chroot/"
  36. - name: keyboard configuration
  37. include_role:
  38. name: keyboard_configuration
  39. vars:
  40. root_target_directory: "{{ live_build_directory }}/config/includes.chroot/"
  41. when: live_build_serial_console == false
  42. - name: include common packages
  43. template:
  44. src: common.list.chroot.j2
  45. dest: "{{ live_build_directory }}/config/package-lists/common.list.chroot"
  46. - name: include console-setup package
  47. copy:
  48. content: console-setup
  49. dest: "{{ live_build_directory }}/config/package-lists/console-setup.list.chroot"
  50. when: live_build_serial_console == false
  51. - name: resolvconf symlink
  52. file:
  53. src: /etc/resolvconf/run/resolv.conf
  54. dest: "{{ live_build_directory }}/config/includes.chroot/etc/resolv.conf"
  55. force: yes
  56. state: link
  57. - name: include custom packages
  58. template:
  59. src: custom.list.chroot.j2
  60. dest: "{{ live_build_directory }}/config/package-lists/custom.list.chroot"
  61. when: live_build_custom_packages is defined
  62. - name: isolinx directory
  63. file:
  64. path: "{{ live_build_directory }}/config/includes.binary/isolinux"
  65. state: directory
  66. - name: isolinux.cfg
  67. template:
  68. src: isolinux.cfg.j2
  69. dest: "{{ live_build_directory }}/config/includes.binary/isolinux/isolinux.cfg"
  70. - name: lb bootstrap (first build stage)
  71. command:
  72. lb bootstrap
  73. args:
  74. chdir: "{{ live_build_directory }}"
  75. register: _lb_bootstrap
  76. - name: lb chroot (second build stage)
  77. command:
  78. lb chroot
  79. args:
  80. chdir: "{{ live_build_directory }}"
  81. register: _lb_chroot
  82. - name: lb installer (third build stage)
  83. command:
  84. lb installer
  85. args:
  86. chdir: "{{ live_build_directory }}"
  87. register: _lb_installer
  88. - name: lb binary (fourth build stage)
  89. command:
  90. lb binary
  91. args:
  92. chdir: "{{ live_build_directory }}"
  93. register: _lb_binary
  94. #- name: lb source (fifth build stage)
  95. # command:
  96. # lb source
  97. # args:
  98. # chdir: "{{ live_source_directory }}"
  99. # register: _lb_source
  100. #- name: lb build
  101. # command:
  102. # lb build
  103. # args:
  104. # chdir: "{{ live_build_directory }}"
  105. # register: _lb_build
  106. #
  107. #- name: save build log
  108. # copy:
  109. # content: "{{ _lb_build.stdout }}"
  110. # dest: "{{ live_build_directory }}/build.log"