One profile for all interfaces

Hi, I’m just getting to know Rocky. Is it possible to describe the entire configuration for all interfaces in one profile? I now have several profiles for lo, the ens1f1 interface, and the ens1f1.900 subinterface. Can I combine them all into one configuration file?

[root@rnd-rocky system-connections]# ls
ens1f1.900.nmconnection  ens1f1.nmconnection  lo.nmconnection

No and don’t. (Well, see below.)

The loopback interface lo is special. One does not simply even look at its direction.

Don’t look at that directory / those files.
Look at:

nmcli
nmcli d s
nmcli d sh
nmcli c s
# and if name of connection is "ens1f1", then
nmcli c s ens1f1

There is a way to have “all-in-one (except the lo)”. Configuration Management System.

dnf install ansible-core rhel-system-roles

These give command ansible-playbook and modules for writing a playbook that uses rhel-system-roles.network
Red Hat has some example of that in Red Hat Enterprise Linux (RHEL) System Roles - Red Hat Customer Portal

You can have “all the profiles” of host (or hosts) in one Ansible inventory/playbook. (Easy to backup, btw.) You run ansible-playbook and it makes sure that the config of host(s) has what the play says.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.