From 4bef627f7b8dcd918afd468b1177fe765dcdcc5e Mon Sep 17 00:00:00 2001 From: Oliver Kelly Date: Mon, 1 Jul 2024 16:08:48 +0100 Subject: [PATCH] simplifying importing os tasks --- cephadm-preflight.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/cephadm-preflight.yml b/cephadm-preflight.yml index 324411f..04c8919 100644 --- a/cephadm-preflight.yml +++ b/cephadm-preflight.yml @@ -46,15 +46,9 @@ name: ceph_defaults - name: Import specific OS-related tasks - include_tasks: "{{ lookup('first_found', __OS_distribution) }}" - vars: - __OS_distribution: - files: - - "tasks/{{ ansible_facts['distribution'] }}.yml" - paths: - - "{{ playbook_dir }}" - skip: true - + import_tasks: "{{ item }}" + with_first_found: + - "{{ ansible_distribution }}.yml" - name: set insecure container registry in /etc/containers/registries.conf ansible.builtin.import_playbook: cephadm-set-container-insecure-registries.yml