I'm new to ansible and a little googling hasn't lead me quickly towards the
right solution to my question.
What's the 'with the grain' way to assign static network settings to a
centos-7 host with ansible. I feel like this must be a pretty common need
-- and there must be a lot of people with questions about the right
approach to take after all the changes to the network configuration system
that comes with transitioning from rhel-6 to rhel-7 (namely:
network-manager by default, consistent device naming from the kernel by
default, systemd).
Prior to ansible I had been uninstalling network-manager and manually
configuring hosts via /etc/init.d/network-scripts/ifcfg-* files -- I think
I could do the same thing -- generating the correct ifcfg-* file using the
ansible_default_ipv4['interface'] fact ...?
"ansible_default_ipv4": {
"address": <snip>,
"alias": "enp3s0",
"gateway": <snip>,
"interface": "enp3s0",
"macaddress": <snip>,
"mtu": 1500,
"netmask": "255.255.255.128",
"network": <snip>,
"type": "ether"
}
Ansible far is so great and for this I want to make sure I'm not going
unnecessarily against the ansible grain. I'm willing to not uninstall
network-manager if there are good ways to manage the network-manager
mediated interface configuration through ansible ...
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/2b173d8b-4ef5-461d-ac1b-5e856b6c84c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.