mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 02:15:17 +00:00
If updates for network packages are available and wireless or team connections are specified, NetworkManager must be restarted, the role requires user's consent to restart NetworkManager. Otherwise, there might be property conflicts between NetworkManager daemon and plugin, or NetworkManager plugin is not taking effect. `update_cache` is enabled in the module tasks to check if updates for network packages are available due to wireless or team interfaces, in that case, NetworkManager needs user's explicit consent to be restarted after the network package updates. And using `state: latest` for checking the network package updates because we have to guarantee that NetworkManager and its plugin have the same and most recent version for configuring the network connections settings in the backend. It is worthwhile to mention that we have both tasks using dnf and yum module for checking available updates for network packages. Because checking package cache update is not supported in Ansible package module, Fedora and RHEL8+ use DNF package manager by default, RHEL7 uses yum package manager by default. This commit will address the situation that users forget to explicitly specify `network_allow_restart: true` when specifying wireless or team connections. Signed-off-by: Wen Liang <liangwen12year@gmail.com>
10 lines
391 B
YAML
10 lines
391 B
YAML
# SPDX-License-Identifier: BSD-3-Clause
|
|
---
|
|
- name: Assert that configuring network connections failed
|
|
assert:
|
|
that:
|
|
- __network_service_restart_requested is failed
|
|
- __network_service_restart_requested is search(
|
|
network_connections_result_error)
|
|
msg: Configuring network connections is not failed with the error
|
|
"{{ network_connections_result_error }}"
|