Closed ashak closed 7 years ago
as documented in the defaults/main.yml you might set network_restart_method
to nothing
. So nothing is done.
To elaborate a bit more... We have two situations.
When applied first, we change the main interface description, to include all our details from the directory. In order to make this effective we use the network_allow_service_restart
. You set this to no
and nothing will happen in this case.
When only one of the interfaces is changed later, just the individual interface requires a restart. You can control how this is done with the network_restart_method
. The content of this variable is used to index the network_interface_restart_commands
hash. If it is service
we use the service
module of Ansible.
Thanks for this, I will try it out. I had not spotted the defaults/main.yml file.
I see there's a variable network_allow_service_restart, but this only seems to cover part of restarting things after interfaces are configured.
Is it (or could it be) possible to also have a way to not to try and restart the interfaces after their configuration is put in place?
The task i'm thinking of specifically is 'network restart interface command'. I want to not run this task at all and then simply reboot the machine afterwards.