community.general.interfaces_file – Tweak settings in /etc/network/interfaces files¶
This plugin is part of the community.general collection.
To install it use:
ansible-galaxy collection install community.general.
To use it in a playbook, specify:
If option is defined multiple times last one will be updated but all will be deleted in case of an absent state
- name: Set eth1 mtu configuration value to 8000 community.general.interfaces_file: dest: /etc/network/interfaces.d/eth1.cfg iface: eth1 option: mtu value: 8000 backup: yes state: present register: eth1_cfg
Common return values are documented here, the following are the fields unique to this module: