Zack Williams | 98725e2 | 2021-03-18 10:21:26 -0700 | [diff] [blame] | 1 | --- |
| 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 Williams | 7f58df0 | 2021-09-14 13:49:57 -0700 | [diff] [blame] | 15 | - name: Install ps command for Debian init.d script to function |
| 16 | apt: |
| 17 | name: |
| 18 | - "procps" |
| 19 | state: "present" |
| 20 | |
Zack Williams | 98725e2 | 2021-03-18 10:21:26 -0700 | [diff] [blame] | 21 | - 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" |