Network interfaces management module

This module is a way to manage the /etc/network/interfaces file in Linux hosts. Basically, it allows you to create, modify, and remove a network interface configuration. This configuration is specific to each identified network interface; it does not change non-specified ones. The following playbook shows you how to perform a change for a specific interface:

    - name: Change mtu to 1500 for eth1 interface
Interfaces_file:
dest: /etc/network/interfaces
iface: eth1
option: mtu
value: 1500
backup: yes
state: present

If this task gets its return values registered, the user can easily identify all the information about the after-change configuration of the interface.

For more advanced network management, check out the nmcli module. It can manage various connection and device types: Ethernet, teams, bonds, and VLANs.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.248.208