add possibility to set os_family youself

This commit is contained in:
Jannik Beyerstedt 2019-10-10 16:43:35 +02:00
parent 1c24c11aa4
commit ce06ba5b48
5 changed files with 8 additions and 5 deletions

View file

@ -13,7 +13,7 @@ none
Role Variables
--------------
TODO
TODO: set override_os_family in inventory for exotic OS like Mendel on Coral Board, which returns "Mendel GNU/Linux" but is a Debian derivative and uses apt.
Dependencies

View file

@ -5,4 +5,4 @@
include_tasks: "{{ item }}"
with_first_found:
- "essentials-{{ ansible_distribution }}.yml"
- "essentials-{{ ansible_os_family }}.yml"
- "essentials-{{ (override_os_family is defined) | ternary(override_os_family,ansible_os_family) }}.yml"

View file

@ -5,4 +5,4 @@
include_tasks: "{{ item }}"
with_first_found:
- "tools-{{ ansible_distribution }}.yml"
- "tools-{{ ansible_os_family }}.yml"
- "tools-{{ (override_os_family is defined) | ternary(override_os_family,ansible_os_family) }}.yml"

View file

@ -1,8 +1,11 @@
---
# Common/Update: Install All Updates
- debug:
msg: OS Family {{ override_os_family }} -> {{ (override_os_family is defined) | ternary(override_os_family,ansible_os_family) }}
- name: update - Update and upgrade all packages
include_tasks: "{{ item }}"
with_first_found:
- "update-{{ ansible_distribution }}.yml"
- "update-{{ ansible_os_family }}.yml"
- "update-{{ (override_os_family is defined) | ternary(override_os_family,ansible_os_family) }}.yml"

View file

@ -6,4 +6,4 @@
include_tasks: "{{ item }}"
with_first_found:
- "usersetup-{{ ansible_distribution }}.yml"
- "usersetup-{{ ansible_os_family }}.yml"
- "usersetup-{{ (override_os_family is defined) | ternary(override_os_family,ansible_os_family) }}.yml"