blob: 56f747d8428a5850ffb20cb3abe00172163b0865 [file] [log] [blame]
Zack Williams5b5d9a72020-11-06 13:59:06 -07001---
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 Williams6f70f4d2021-06-07 12:54:07 -070010
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"