diff --git a/README.md b/README.md index 3d2cd7f..3bbfccb 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/tasks/essentials.yml b/tasks/essentials.yml index 98bbfab..956cd4b 100644 --- a/tasks/essentials.yml +++ b/tasks/essentials.yml @@ -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" diff --git a/tasks/tools.yml b/tasks/tools.yml index 396ac77..af77562 100644 --- a/tasks/tools.yml +++ b/tasks/tools.yml @@ -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" diff --git a/tasks/update.yml b/tasks/update.yml index dda7b59..38f3331 100644 --- a/tasks/update.yml +++ b/tasks/update.yml @@ -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" diff --git a/tasks/usersetup.yml b/tasks/usersetup.yml index e440fe0..1bf7c18 100644 --- a/tasks/usersetup.yml +++ b/tasks/usersetup.yml @@ -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"