network/examples/route_table_support.yml
Rich Megginson 2e8ac7aa66 ansible-lint 6.x updates
The only thing we need to skip currently is using FQCN for ansible
builtin modules, plugins
Add `kinds` - otherwise, Ansible thinks anything not in a traditional
role path is a plain YAML file, and we don't get the additional
checking.
Ensure all plays are named.
Fix some other minor problems.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-01-08 15:12:11 -07:00

36 lines
1,013 B
YAML

# SPDX-License-Identifier: BSD-3-Clause
---
- name: Manage routing tables
hosts: all
tasks:
- name: Add a new routing table
lineinfile:
path: /etc/iproute2/rt_tables.d/table.conf
line: 200 custom
mode: "0644"
create: true
- name: Configure connection profile and specify the table in static routes
import_role:
name: linux-system-roles.network
vars:
network_connections:
- name: eth0
type: ethernet
state: up
autoconnect: true
ip:
dhcp4: false
address:
- 198.51.100.3/26
route:
- network: 198.51.100.128
prefix: 26
gateway: 198.51.100.1
metric: 2
table: 30400
- network: 198.51.100.64
prefix: 26
gateway: 198.51.100.6
metric: 4
table: custom