diff --git a/tasks/main.yml b/tasks/main.yml index 97508a3..6a7edb4 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,10 +1,16 @@ --- # tasks file for bareos_sd +- name: Include OS-specific vars + ansible.builtin.include_vars: "{{ item }}" + with_first_found: + - "{{ ansible_facts.distribution }}_{{ ansible_facts.distribution_major_version }}.yml" + - "{{ ansible_facts.os_family }}.yml" + - name: Import assert.yml ansible.builtin.import_tasks: file: assert.yml - run_once: yes + run_once: true delegate_to: localhost - name: Install packages diff --git a/vars/Debian.yml b/vars/Debian.yml new file mode 100644 index 0000000..a3b68e6 --- /dev/null +++ b/vars/Debian.yml @@ -0,0 +1,5 @@ +--- + +bareos_sd_debug_packages: + - bareos-dbg + - gdb diff --git a/vars/main.yml b/vars/main.yml index c577c38..e562009 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -5,15 +5,6 @@ bareos_sd_packages: - bareos-storage - bareos-storage-tape -# A map to define the packages to install for debugging. -_bareos_sd_debug_packages: - default: - - bareos-storage-debuginfo - - gdb - Debian: - - bareos-dbg - - gdb - RedHat-7: - - bareos-debuginfo - - gdb -bareos_sd_debug_packages: "{{ _bareos_sd_debug_packages[ansible_os_family ~ '-' ~ ansible_distribution_major_version] | default(_bareos_sd_debug_packages[ansible_os_family] | default(_bareos_sd_debug_packages['default'])) }}" +bareos_sd_debug_packages: + - bareos-storage-debuginfo + - gdb