mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 02:15:17 +00:00
Use is version instead of |version_compare
Using tests as filters is deprecated and `version_compare` was renamed to `version` in Ansible 2.5.
This commit is contained in:
parent
979145cbae
commit
84fe98508e
1 changed files with 1 additions and 1 deletions
|
|
@ -2,7 +2,7 @@
|
|||
network_connections: []
|
||||
|
||||
# Use initscripts for RHEL/CentOS < 7, nm otherwise
|
||||
network_provider_os_default: "{{ 'initscripts' if ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version |version_compare('7', '<') else 'nm' }}"
|
||||
network_provider_os_default: "{{ 'initscripts' if ansible_distribution in ['RedHat', 'CentOS'] and ansible_distribution_major_version is version('7', '<') else 'nm' }}"
|
||||
# If NetworkManager.service is running, assume that 'nm' is currently in-use,
|
||||
# otherwise initscripts
|
||||
network_provider_current: "{{ 'nm' if 'NetworkManager.service' in ansible_facts.services and ansible_facts.services['NetworkManager.service']['state'] == 'running' else 'initscripts' }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue