blob: e6b92bf5d60112226cf81e50d125f0f46a8730a6 [file] [log] [blame]
Zack Williams98725e22021-03-18 10:21:26 -07001---
2# dhcpd molecule/default/prepare.yml
3#
4# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
5# SPDX-License-Identifier: Apache-2.0
6
7- name: Prepare
8 hosts: all
9
10 tasks:
11 - name: Update apt cache
12 apt:
13 update_cache: true
14
Zack Williams7f58df02021-09-14 13:49:57 -070015 - name: Install ps command for Debian init.d script to function
16 apt:
17 name:
18 - "procps"
19 state: "present"
20
Zack Williams98725e22021-03-18 10:21:26 -070021 - name: Create a bridge to nowhere so dhcpd can start during testing
22 when: "'bridge0' not in ansible_interfaces"
23 command:
24 cmd: "{{ item }}"
25 with_items:
26 - "ip link add bridge0 type bridge"
27 - "ip addr add 192.168.0.5/24 dev bridge0"
28 - "ip link set bridge0 up"