Zack Williams | 5b5d9a7 | 2020-11-06 13:59:06 -0700 | [diff] [blame] | 1 | --- |
| 2 | # pxeboot tasks/ubuntu1804.yml |
| 3 | # |
| 4 | # SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| 5 | # SPDX-License-Identifier: Apache-2.0 |
| 6 | |
| 7 | - name: Create ubuntu1804 dir in webroot |
| 8 | file: |
| 9 | state: directory |
| 10 | path: "{{ pxeboot_web_root }}/ubuntu1804" |
| 11 | owner: "{{ pxeboot_username }}" |
| 12 | group: "{{ pxeboot_groupname }}" |
| 13 | mode: "0755" |
| 14 | |
| 15 | - name: Download ubuntu1804 files |
| 16 | get_url: |
| 17 | url: "{{ pxeboot_ubuntu1804_base_url }}/{{ pxeboot_ubuntu1804_version }}/{{ item['name'] }}" |
| 18 | dest: "{{ pxeboot_web_root }}/ubuntu1804/{{ item['name'] }}" |
| 19 | checksum: "{{ item['checksum'] }}" |
| 20 | owner: "{{ pxeboot_username }}" |
| 21 | group: "{{ pxeboot_groupname }}" |
| 22 | mode: "0644" |
| 23 | with_items: "{{ pxeboot_ubuntu1804_files }}" |
| 24 | |
Zack Williams | 6f70f4d | 2021-06-07 12:54:07 -0700 | [diff] [blame] | 25 | - name: Create preseed files (serial) |
Zack Williams | 5b5d9a7 | 2020-11-06 13:59:06 -0700 | [diff] [blame] | 26 | template: |
| 27 | src: "ubuntu1804_preseed.cfg.j2" |
| 28 | dest: "{{ pxeboot_web_root }}/ubuntu1804/{{ item['serial'] }}_preseed.cfg" |
| 29 | owner: "{{ pxeboot_username }}" |
| 30 | group: "{{ pxeboot_groupname }}" |
| 31 | mode: "0644" |
| 32 | with_items: "{{ pxeboot_hosts }}" |
Zack Williams | 6f70f4d | 2021-06-07 12:54:07 -0700 | [diff] [blame] | 33 | when: "'serial' in item and item.serial" |
| 34 | |
| 35 | - name: Create preseed files (MAC) |
| 36 | template: |
| 37 | src: "ubuntu1804_preseed.cfg.j2" |
| 38 | dest: "{{ pxeboot_web_root }}/ubuntu1804/{{ item['mac_address'] | lower }}_preseed.cfg" |
| 39 | owner: "{{ pxeboot_username }}" |
| 40 | group: "{{ pxeboot_groupname }}" |
| 41 | mode: "0644" |
| 42 | with_items: "{{ pxeboot_hosts }}" |
| 43 | when: "'mac_address' in item and item.mac_address" |