blob: 87a1af4fbed50a7980134c79f8c5e540a3bd4e84 [file] [log] [blame]
---
# pxeboot tasks/debian11.yml
#
# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
# SPDX-License-Identifier: Apache-2.0
- name: Create debian11 dir in webroot
file:
state: directory
path: "{{ pxeboot_web_root }}/debian11"
owner: "{{ pxeboot_username }}"
group: "{{ pxeboot_groupname }}"
mode: "0755"
- name: Download debian11 base files
get_url:
url: "{{ pxeboot_debian11_base_url }}/{{ pxeboot_debian11_version }}/{{ item['name'] }}"
dest: "{{ pxeboot_web_root }}/debian11/{{ item['name'] }}"
checksum: "{{ item['checksum'] }}"
owner: "{{ pxeboot_username }}"
group: "{{ pxeboot_groupname }}"
mode: "0644"
with_items: "{{ pxeboot_debian11_files }}"
- name: Download debian11 nonfree files
get_url:
url: "{{ pxeboot_debian11_nonfree_url }}/{{ item['path'] }}/{{ item['name'] }}"
dest: "{{ pxeboot_web_root }}/debian11/{{ item['name'] }}"
checksum: "{{ item['checksum'] }}"
owner: "{{ pxeboot_username }}"
group: "{{ pxeboot_groupname }}"
mode: "0644"
with_items: "{{ pxeboot_debian11_nonfree_files }}"
- name: Create debian11 preseed files (serial)
template:
src: "debian11_preseed.cfg.j2"
dest: "{{ pxeboot_web_root }}/debian11/{{ item['serial'] }}_preseed.cfg"
owner: "{{ pxeboot_username }}"
group: "{{ pxeboot_groupname }}"
mode: "0644"
with_items: "{{ pxeboot_hosts }}"
when: "'serial' in item and item.serial"
- name: Create preseed files (MAC)
template:
src: "debian11_preseed.cfg.j2"
dest: "{{ pxeboot_web_root }}/debian11/{{ item['mac_address'] | lower }}_preseed.cfg"
owner: "{{ pxeboot_username }}"
group: "{{ pxeboot_groupname }}"
mode: "0644"
with_items: "{{ pxeboot_hosts }}"
when: "'mac_address' in item and item.mac_address"