mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 02:15:17 +00:00
Default to install network-scripts for initscripts
Newer releases of `initscripts` ship the network scripts in a separate package called `network-scripts`. This fixes #81
This commit is contained in:
parent
d4936d1ca7
commit
97adeb5668
1 changed files with 8 additions and 1 deletions
|
|
@ -27,11 +27,18 @@ _network_packages_default_initscripts_bridge: ["{% if ['bridge'] in network_conn
|
|||
(ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('28', '<='))
|
||||
)
|
||||
%}bridge-utils{% endif %}"]
|
||||
_network_packages_default_initscripts_network_scripts: ["{%
|
||||
if (ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('7', '<=')) or
|
||||
(ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('28', '<='))
|
||||
%}initscripts{% else %}network-scripts{% endif %}"]
|
||||
# convert _network_packages_default_initscripts_bridge to an empty list if it
|
||||
# contains only the empty string and add it to the default package list
|
||||
# |select() filters the list to include only values that evalueate to true (the empty string is false)
|
||||
# |list() converts the generator that |select() creates to a list
|
||||
network_packages_default_initscripts: "{{ ['ethtool'] + _network_packages_default_initscripts_bridge|select()|list() }}"
|
||||
network_packages_default_initscripts: "{{ ['ethtool']
|
||||
+ _network_packages_default_initscripts_bridge|select()|list()
|
||||
+ _network_packages_default_initscripts_network_scripts|select()|list()
|
||||
}}"
|
||||
|
||||
|
||||
# The user can explicitly set host variables "network_provider",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue