4 when: openwrt_imgbuilder_tarball is not defined
9 - name: Create the output directory for built images
11 path: "{{ openwrt_output_dir }}"
14 - name: generate list of packages to add or remove
17 {{ openwrt_packages_remove | map('regex_replace', '^', '-') | join(' ') }}
18 {{ openwrt_packages_add | join(' ') }}
19 {{ openwrt_packages_extra | join(' ') }}
21 - name: Build the OpenWrt image
23 make -C {{ openwrt_imgbuilder_dir }}/{{ openwrt_tarball_basename }} image
24 {% if openwrt_profile is defined %}PROFILE="{{ openwrt_profile }}" {% endif %}
25 FILES="{{ openwrt_imgbuilder_files }}"
26 PACKAGES="{{ openwrt_packages }}"
27 {% if openwrt_extra_name is defined %} EXTRA_IMAGE_NAME="{{ openwrt_extra_name }}" {% endif %}
29 - name: Copy newly built OpenWrt image
30 with_items: "{{ openwrt_output_image_suffixes }}"
32 src: "{{ openwrt_imgbuilder_dir }}/{{ openwrt_tarball_basename }}/bin/targets/{{ openwrt_arch }}/{{ openwrt_target }}/{{ openwrt_output_image_name_base }}-{{ item }}"
33 dest: "{{ openwrt_output_dir }}"
36 - name: Delete the temporary build directory
38 path: "{{ openwrt_imgbuilder_dir }}"