Zack Williams | 5b5d9a7 | 2020-11-06 13:59:06 -0700 | [diff] [blame] | 1 | --- |
| 2 | # pxeboot molecule/default/verify.yml |
| 3 | # |
| 4 | # SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org> |
| 5 | # SPDX-License-Identifier: Apache-2.0 |
| 6 | |
| 7 | - name: Verify |
| 8 | hosts: all |
| 9 | tasks: |
Zack Williams | 6f70f4d | 2021-06-07 12:54:07 -0700 | [diff] [blame] | 10 | |
| 11 | - name: Check that preseed files are available (Serial) |
| 12 | uri: |
| 13 | url: "http://127.0.0.1/ubuntu1804/{{ item['serial'] }}_preseed.cfg" |
| 14 | status_code: 200 |
| 15 | return_content: true |
| 16 | register: ps_serial |
| 17 | failed_when: "item['hostname'] not in ps_serial.content" |
| 18 | with_items: "{{ pxeboot_hosts }}" |
| 19 | when: "'serial' in item and item.serial" |
| 20 | |
| 21 | - name: Check for preseed files (MAC) |
| 22 | uri: |
| 23 | url: "http://127.0.0.1/ubuntu1804/{{ item['mac_address'] }}_preseed.cfg" |
| 24 | status_code: 200 |
| 25 | return_content: true |
| 26 | register: ps_mac |
| 27 | failed_when: "item['hostname'] not in ps_mac.content" |
| 28 | with_items: "{{ pxeboot_hosts }}" |
| 29 | when: "'mac_address' in item and item.mac_address" |