network/examples/network_state.yml
Rich Megginson cf356230ca support ansible-core-2.14, ansible-lint 6.x
ansible-core 2.14 is now the current version of Ansible.  This version
does not support `args: warn: false` so we have to remove it from the
network role.  Users will need to use `COMMAND_WARNINGS` in their
Ansible configuration in order to suppress the warning in older versions
of Ansible such as 2.9, 2.11.
In addition, the gating tests are getting stricter about using new best
practices, such as using `true`, `false` for booleans instead of `yes`,
`no`; use of spaces in Jinja expressions; etc.  These issues were
addressed.
The `tests/` directory contains far too many cases of non-recommended
practices, so this directory has been exempted.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2022-11-14 13:54:14 -07:00

50 lines
1.2 KiB
YAML

# SPDX-License-Identifier: BSD-3-Clause
---
- hosts: all
vars:
network_state:
interfaces:
- name: ethtest0
type: ethernet
state: up
ipv4:
enabled: true
address:
- ip: 192.168.122.250
prefix-length: 24
dhcp: false
ipv6:
enabled: true
address:
- ip: 2001:db8::1:1
prefix-length: 64
autoconf: false
dhcp: false
- name: ethtest1
type: ethernet
state: up
ipv4:
enabled: true
auto-dns: false
dhcp: true
ipv6:
enabled: true
auto-dns: false
dhcp: true
routes:
config:
- destination: 192.0.2.100/30
metric: 150
next-hop-address: 192.168.122.250
next-hop-interface: ethtest0
table-id: 254
dns-resolver:
config:
search:
- example.com
- example.org
server:
- 2001:4860:4860::8888
- 8.8.8.8
roles:
- linux-system-roles.network