Skip to content

Latest commit

 

History

History
71 lines (44 loc) · 2.22 KB

README.md

File metadata and controls

71 lines (44 loc) · 2.22 KB

Travis (.org) branch Ansible Galaxy GitHub tag (latest by date) Ansible Galaxy Downloads

Ansible Role: IP Route

An Ansible Role that manages IP routes.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

ip_route_configs: {}

IP routes are defined using ip_route_configs variable.

ip_route_configs:
  eth0:
    - gateway: 172.0.1.1
      network: 172.0.1.0/24

The configuration above manages the route for the network 172.0.1.0/24 using the gateway 172.0.1.1 over the device eth0.

The configuration is persisted within /etc/network/{if-up.d|if-down.d}.

ip_route_configs:
  eth0:
    - network: 172.0.1.0/24
      state: absent

Use state: absent to remove a specific route. Routes are identified by the network.

Tags

Tags can be used to limit the role execution to a particular task module. Following tags are available:

  • ip_route: Covers the full role lifecycle.
  • ip_route_config, config: Applies required configuration.

Dependencies

None.

Example Playbook

- hosts: all
  roles:
     - nl2go.ip_route

Development

Use docker-molecule following the instructions to run Molecule or install Molecule locally (not recommended, version conflicts might appear).

Use following to run tests:

molecule test --all

Maintainers

License

See the LICENSE.md file for details.

Author Information

This role was created by in 2020 by Newsletter2Go GmbH.