Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

134 linhas
3.0KB

  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: ssh root access
  32. include_role:
  33. name: ssh_root_access
  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: systemd network config directory
  43. file:
  44. path: "{{ live_build_directory }}/config/includes.chroot/etc/systemd/network"
  45. state: directory
  46. - name: name policy for predictable interface names with virtio to mac
  47. template:
  48. src: virtio.link.j2
  49. dest: "{{ live_build_directory }}/config/includes.chroot/etc/systemd/network/20-virtio.link"
  50. - name: include common packages
  51. template:
  52. src: common.list.chroot.j2
  53. dest: "{{ live_build_directory }}/config/package-lists/common.list.chroot"
  54. - name: include console-setup package
  55. copy:
  56. content: console-setup
  57. dest: "{{ live_build_directory }}/config/package-lists/console-setup.list.chroot"
  58. when: live_build_serial_console == false
  59. - name: include custom packages
  60. template:
  61. src: custom.list.chroot.j2
  62. dest: "{{ live_build_directory }}/config/package-lists/custom.list.chroot"
  63. when: live_build_custom_packages is defined
  64. - name: isolinx directory
  65. file:
  66. path: "{{ live_build_directory }}/config/includes.binary/isolinux"
  67. state: directory
  68. - name: isolinux.cfg
  69. template:
  70. src: isolinux.cfg.j2
  71. dest: "{{ live_build_directory }}/config/includes.binary/isolinux/isolinux.cfg"
  72. - name: lb bootstrap (first build stage)
  73. command:
  74. lb bootstrap
  75. args:
  76. chdir: "{{ live_build_directory }}"
  77. register: _lb_bootstrap
  78. - name: lb chroot (second build stage)
  79. command:
  80. lb chroot
  81. args:
  82. chdir: "{{ live_build_directory }}"
  83. register: _lb_chroot
  84. - name: lb installer (third build stage)
  85. command:
  86. lb installer
  87. args:
  88. chdir: "{{ live_build_directory }}"
  89. register: _lb_installer
  90. - name: lb binary (fourth build stage)
  91. command:
  92. lb binary
  93. args:
  94. chdir: "{{ live_build_directory }}"
  95. register: _lb_binary
  96. #- name: lb source (fifth build stage)
  97. # command:
  98. # lb source
  99. # args:
  100. # chdir: "{{ live_source_directory }}"
  101. # register: _lb_source
  102. #- name: lb build
  103. # command:
  104. # lb build
  105. # args:
  106. # chdir: "{{ live_build_directory }}"
  107. # register: _lb_build
  108. #
  109. #- name: save build log
  110. # copy:
  111. # content: "{{ _lb_build.stdout }}"
  112. # dest: "{{ live_build_directory }}/build.log"