amtega.network_interfaces

Amtega Network Interfaces Role

This is an Ansible role that configures IPv4 network interfaces.

Role Variables

You can find all the default variables for this role in defaults/main.yml.

The role sets up the following information:

  • network_interfaces_ip_mac_map: a list that connects IP addresses to MAC addresses.

Example Playbook

Here is an example of a playbook:

---
- name: Sample for Network Interfaces Role
  hosts: localhost
  roles:  
    - amtega.network_interfaces
  vars:
    network_interfaces_hostname: "{{ inventory_hostname }}"
    network_interfaces_gateway: 192.168.5.1
    network_interfaces_ipv6: no
    network_interfaces_dns_domain: acme.com
    network_interfaces_dns_search:
      - acme.com
      - acme.org
    network_interfaces_dns_nameserver:
      - 192.168.5.200
      - 192.168.5.201
    network_interfaces_dns_options:
      - timeout: 1
      - rotate

    network_interfaces:
      - logicalname: management-01
        macaddress: 08:00:27:06:c1:f8
        ipv4:
          - address: 192.168.5.15
            cidr: 24
        mtu: 1500
        route:
          - net: 192.168.6.0/24
            gateway: 192.168.5.34
        route_multicast: no
        vlanid: 1024
        bond: no      

Testing

Tests use Molecule with Vagrant Virtual Machines.

cd amtega.network_interfaces

molecule test --all

License

Copyright (C) 2022 AMTEGA - Xunta de Galicia

This role is free software. You can share it and/or change it under these terms:

GNU General Public License version 3, or (if you prefer) any later version; or the European Union Public License, either Version 1.2 or later versions approved by the European Commission.

This role is provided with the hope that it will be helpful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License or the European Union Public License for more details.

Author Information

  • José Enrique Mourón Regueira
  • Juan Antonio Valiño García.
Informazioni sul progetto

Configure ipv4 network interfaces

Installa
ansible-galaxy install amtega.network_interfaces
Licenza
gpl-3.0
Download
95
Proprietario
Agency for Technological Modernization of Galicia