servers/README.md

27 lines
1 KiB
Markdown
Raw Normal View History

2023-07-20 11:26:36 +00:00
These Ansible roles set up servers running various Linux distributions to participate in BGP routing. Device and IP address data are pulled from NetBox. A separate VRF `mgmt` is configured for a L2 management interface.
# Setup
Each server should have the following information recorded in NetBox:
- network interfaces `mgmt*`: used for management (Ansible) access; must define MAC and IP address
- network interfaces `lan*`: used for BGP routing; must define MAC address
- network interface `lo`: must define the IP address to announce over BGP, also serves as router ID
MAC addresses are used to rename interfaces in the host OS. Prefix for the management IP address should define the `gateway` custom field.
2023-07-20 11:26:36 +00:00
# Run
Create a read-only token in NetBox. Define required variables:
2024-05-19 12:22:41 +00:00
export NETBOX_API=<url>
export NETBOX_TOKEN=<token>
2023-07-20 11:26:36 +00:00
Run one-off tasks with (add `--key-file` or other options as necessary):
2024-04-27 08:57:32 +00:00
ansible -m ping 'server-*'
2023-07-20 11:26:36 +00:00
Run a playbook with:
2024-04-27 08:57:32 +00:00
ansible-playbook setup.yml -l 'server-*'