From: Michael Jeanson Date: Mon, 18 Jul 2022 20:24:43 +0000 (-0400) Subject: ansible: Add Ubuntu 22.04 support to compilers role X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=60ecd28091fbed4af2370da950c8618de99e01c6;p=lttng-ci.git ansible: Add Ubuntu 22.04 support to compilers role Change-Id: I0a75bc3592c9757f1919082600e8b461d108967e Signed-off-by: Michael Jeanson --- diff --git a/automation/ansible/roles/compilers/tasks/main.yml b/automation/ansible/roles/compilers/tasks/main.yml index 4595c12..87bed05 100644 --- a/automation/ansible/roles/compilers/tasks/main.yml +++ b/automation/ansible/roles/compilers/tasks/main.yml @@ -1,16 +1,15 @@ --- # Include variables and define needed variables. - name: Include OS-specific variables. - include_vars: "{{ ansible_os_family }}.yml" - -- name: Define compilers_packages. - set_fact: - compilers_packages: "{{ __compilers_packages | list }}" - when: compilers_packages is not defined + include_vars: "{{ item }}" + with_first_found: + - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml" + - "{{ ansible_distribution }}.yml" + - "{{ ansible_os_family }}.yml" # Setup/install tasks. - include: setup-RedHat.yml - when: ansible_os_family == 'RedHat' + when: ansible_os_family in ['RedHat', 'Rocky'] - include: setup-Debian.yml when: ansible_os_family == 'Debian' diff --git a/automation/ansible/roles/compilers/vars/Alpine.yml b/automation/ansible/roles/compilers/vars/Alpine.yml index c06b535..c12ad75 100644 --- a/automation/ansible/roles/compilers/vars/Alpine.yml +++ b/automation/ansible/roles/compilers/vars/Alpine.yml @@ -1,3 +1,2 @@ --- -# TODO -__compilers_packages: [] +compilers_packages: [] diff --git a/automation/ansible/roles/compilers/vars/Debian.yml b/automation/ansible/roles/compilers/vars/Debian.yml deleted file mode 100644 index e9168eb..0000000 --- a/automation/ansible/roles/compilers/vars/Debian.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -__compilers_packages: - - gcc-4.8 - - gcc-5 - - gcc-6 - - gcc-7 - - gcc-8 - - g++-4.8 - - g++-5 - - g++-6 - - g++-7 - - g++-8 - - clang-3.9 - - clang-4.0 - - clang-5.0 - - clang-6.0 - - clang-7 diff --git a/automation/ansible/roles/compilers/vars/RedHat.yml b/automation/ansible/roles/compilers/vars/RedHat.yml index bf746e2..45d52ee 100644 --- a/automation/ansible/roles/compilers/vars/RedHat.yml +++ b/automation/ansible/roles/compilers/vars/RedHat.yml @@ -1,3 +1,2 @@ --- -# TODO -__compilers_packages: +compilers_packages: diff --git a/automation/ansible/roles/compilers/vars/Suse.yml b/automation/ansible/roles/compilers/vars/Suse.yml index c06b535..c12ad75 100644 --- a/automation/ansible/roles/compilers/vars/Suse.yml +++ b/automation/ansible/roles/compilers/vars/Suse.yml @@ -1,3 +1,2 @@ --- -# TODO -__compilers_packages: [] +compilers_packages: [] diff --git a/automation/ansible/roles/compilers/vars/Ubuntu-18.yml b/automation/ansible/roles/compilers/vars/Ubuntu-18.yml new file mode 100644 index 0000000..f88a27c --- /dev/null +++ b/automation/ansible/roles/compilers/vars/Ubuntu-18.yml @@ -0,0 +1,17 @@ +--- +compilers_packages: + - gcc-4.8 + - gcc-5 + - gcc-6 + - gcc-7 + - gcc-8 + - g++-4.8 + - g++-5 + - g++-6 + - g++-7 + - g++-8 + - clang-3.9 + - clang-4.0 + - clang-5.0 + - clang-6.0 + - clang-7 diff --git a/automation/ansible/roles/compilers/vars/Ubuntu-22.yml b/automation/ansible/roles/compilers/vars/Ubuntu-22.yml new file mode 100644 index 0000000..41813c4 --- /dev/null +++ b/automation/ansible/roles/compilers/vars/Ubuntu-22.yml @@ -0,0 +1,17 @@ +--- +compilers_packages: + - gcc + - gcc-9 + - gcc-10 + - gcc-11 + - gcc-12 + - g++ + - g++-9 + - g++-10 + - g++-11 + - g++-12 + - clang + - clang-11 + - clang-12 + - clang-13 + - clang-14