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:
Till Maas 2018-07-02 14:39:23 +02:00
parent 61557e05e6
commit 5f30c5b5e3
7 changed files with 10 additions and 15 deletions

View file

@ -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

View file

@ -1 +0,0 @@
../../../vars/

View file

@ -1 +0,0 @@
default-initscripts.yml

View file

@ -1 +0,0 @@
default-initscripts.yml

View file

@ -1,2 +0,0 @@
# SPDX-License-Identifier: BSD-3-Clause
network_provider_default: initscripts

View file

@ -1,2 +0,0 @@
# SPDX-License-Identifier: BSD-3-Clause
network_provider_default: nm

View file

@ -1 +0,0 @@
default-nm.yml