From def983841b8c806da363799e1ae963784a01bfa6 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 12 Feb 2022 13:46:59 +0100 Subject: [PATCH] fix rh-8 dependencies --- tasks/main.yml | 12 ++++++++++++ tasks/prepare.yml | 6 +----- vars/redhat-7.yml | 6 ++++++ vars/redhat-8.yml | 6 ++++++ 4 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 vars/redhat-7.yml create mode 100644 vars/redhat-8.yml diff --git a/tasks/main.yml b/tasks/main.yml index ad6d231..11f9caa 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,4 +1,16 @@ --- +- include_vars: "{{ var_files }}" + vars: + var_files: "{{ lookup('first_found', params, errors='ignore') }}" + params: + files: + - "{{ ansible_lsb.id | default('') | lower }}.yml" + - "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version }}.yml" + - "{{ ansible_os_family | lower }}.yml" + paths: + - "vars" + when: var_files + - import_tasks: prepare.yml - import_tasks: install.yml - import_tasks: tls.yml diff --git a/tasks/prepare.yml b/tasks/prepare.yml index 78e8c53..e7b203f 100644 --- a/tasks/prepare.yml +++ b/tasks/prepare.yml @@ -11,11 +11,7 @@ package: name: "{{ item }}" state: present - loop: - - "java-{{ unifi_openjdk_version }}-openjdk" - - unzip - - wget - - pyOpenSSL + loop: "{{ __unifi_deps }}" - name: Create group '{{ unifi_group }}' group: diff --git a/vars/redhat-7.yml b/vars/redhat-7.yml new file mode 100644 index 0000000..6e89d78 --- /dev/null +++ b/vars/redhat-7.yml @@ -0,0 +1,6 @@ +--- +__unifi_deps: + - "java-{{ unifi_openjdk_version }}-openjdk" + - unzip + - wget + - pyOpenSSL diff --git a/vars/redhat-8.yml b/vars/redhat-8.yml new file mode 100644 index 0000000..aa401b9 --- /dev/null +++ b/vars/redhat-8.yml @@ -0,0 +1,6 @@ +--- +__unifi_deps: + - "java-{{ unifi_openjdk_version }}-openjdk" + - unzip + - wget + - python3-pyOpenSSL