mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 02:15:17 +00:00
Use set_facts to set default provider
This avoids symlinks that do not work on Windows: https://github.com/linux-system-roles/network/pull/64#issuecomment-401740870
This commit is contained in:
parent
61557e05e6
commit
5f30c5b5e3
7 changed files with 10 additions and 15 deletions
|
|
@ -1,11 +1,14 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
- name: Set version specific variables
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
|
||||
- "{{ ansible_distribution }}.yml"
|
||||
- "{{ ansible_os_family }}.yml"
|
||||
- "default.yml"
|
||||
- name: Define default provider as nm
|
||||
set_fact:
|
||||
network_provider_default: nm
|
||||
|
||||
- name: Override default provider to initscipts for older systems
|
||||
set_fact:
|
||||
network_provider_default: initscripts
|
||||
when:
|
||||
- ansible_distribution_major_version == "6"
|
||||
- ansible_distribution == "CentOS" or ansible_distribution == "RedHat"
|
||||
|
||||
# needed for ansible_facst.packages
|
||||
- name: Check which packages are installed
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
../../../vars/
|
||||
|
|
@ -1 +0,0 @@
|
|||
default-initscripts.yml
|
||||
|
|
@ -1 +0,0 @@
|
|||
default-initscripts.yml
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
network_provider_default: initscripts
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
network_provider_default: nm
|
||||
|
|
@ -1 +0,0 @@
|
|||
default-nm.yml
|
||||
Loading…
Add table
Add a link
Reference in a new issue