mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-18 17:05:13 +00:00
Merge pull request #135 from tyll/linelength
Break long lines in defaults and remove deprecated checks
This commit is contained in:
commit
aa17fbd080
2 changed files with 14 additions and 13 deletions
|
|
@ -4,8 +4,11 @@ network_connections: []
|
|||
|
||||
# Use initscripts for RHEL/CentOS < 7, nm otherwise
|
||||
network_provider_os_default: "{{
|
||||
'initscripts' if ansible_distribution in ['RedHat', 'CentOS', 'OracleLinux'] and
|
||||
ansible_distribution_major_version is version('7', '<')
|
||||
'initscripts' if ansible_distribution in [
|
||||
'RedHat',
|
||||
'CentOS',
|
||||
'OracleLinux'
|
||||
] and ansible_distribution_major_version is version('7', '<')
|
||||
else 'nm' }}"
|
||||
# If NetworkManager.service is running, assume that 'nm' is currently in-use,
|
||||
# otherwise initscripts
|
||||
|
|
@ -20,27 +23,26 @@ network_provider: "{{ network_provider_current }}"
|
|||
# The python-gobject-base package depends on the python version and
|
||||
# distribution:
|
||||
# - python-gobject-base on RHEL7 (no python2-gobject-base :-/)
|
||||
# - python-gobject-base or python2-gobject-base on Fedora 27
|
||||
# - python3-gobject-base on Fedora 28+
|
||||
network_service_name_default_nm: NetworkManager
|
||||
network_packages_default_nm:
|
||||
- ethtool
|
||||
- NetworkManager
|
||||
- "python{{ ansible_python['version']['major'] | replace('2', '') }}-gobject-base"
|
||||
- "python{{ ansible_python['version']['major'] | replace('2', '')
|
||||
}}-gobject-base"
|
||||
|
||||
network_service_name_default_initscripts: network
|
||||
|
||||
# initscripts requires bridge-utils to manage bridges, install it when the
|
||||
# 'bridge' type is used in network_connections
|
||||
_network_packages_default_initscripts_bridge: ["{% if ['bridge'] in network_connections|json_query('[*][type]') and
|
||||
(
|
||||
(ansible_distribution in ['RedHat', 'CentOS', 'OracleLinux'] and ansible_distribution_major_version is version('7', '<=')) or
|
||||
(ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('28', '<='))
|
||||
)
|
||||
_network_packages_default_initscripts_bridge: ["{%
|
||||
if ['bridge'] in network_connections|json_query('[*][type]') and
|
||||
ansible_distribution in ['RedHat', 'CentOS', 'OracleLinux'] and
|
||||
ansible_distribution_major_version is version('7', '<=')
|
||||
%}bridge-utils{% endif %}"]
|
||||
_network_packages_default_initscripts_network_scripts: ["{%
|
||||
if (ansible_distribution in ['RedHat', 'CentOS', 'OracleLinux'] and ansible_distribution_major_version is version('7', '<=')) or
|
||||
(ansible_distribution == 'Fedora' and ansible_distribution_major_version is version('28', '<='))
|
||||
if ansible_distribution in ['RedHat', 'CentOS', 'OracleLinux'] and
|
||||
ansible_distribution_major_version is version('7', '<=')
|
||||
%}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
|
||||
|
|
|
|||
|
|
@ -17,9 +17,8 @@ galaxy_info:
|
|||
platforms:
|
||||
- name: Fedora
|
||||
versions:
|
||||
- 28
|
||||
- 29
|
||||
- 30
|
||||
- 31
|
||||
- name: EL
|
||||
versions:
|
||||
- 6
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue