From: Michael Jeanson Date: Mon, 18 Jul 2022 20:32:11 +0000 (-0400) Subject: ansible: Add Ubuntu 22.04 support to cross-compilers role X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=32710463d572e5d41c2f1abd9df1b9c866237609;p=lttng-ci.git ansible: Add Ubuntu 22.04 support to cross-compilers role Change-Id: Ibd6fb3eff444156a3d90cbff13b7ebffaa08805b Signed-off-by: Michael Jeanson --- diff --git a/automation/ansible/roles/cross-compilers/tasks/main.yml b/automation/ansible/roles/cross-compilers/tasks/main.yml index 071456a..87bed05 100644 --- a/automation/ansible/roles/cross-compilers/tasks/main.yml +++ b/automation/ansible/roles/cross-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 cross_compilers_packages. - set_fact: - cross_compilers_packages: "{{ __cross_compilers_packages | list }}" - when: cross_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/cross-compilers/vars/Alpine.yml b/automation/ansible/roles/cross-compilers/vars/Alpine.yml index 3528230..bd8da82 100644 --- a/automation/ansible/roles/cross-compilers/vars/Alpine.yml +++ b/automation/ansible/roles/cross-compilers/vars/Alpine.yml @@ -1,3 +1,2 @@ --- -# TODO -__cross_compilers_packages: [] +cross_compilers_packages: [] diff --git a/automation/ansible/roles/cross-compilers/vars/Debian.yml b/automation/ansible/roles/cross-compilers/vars/Debian.yml deleted file mode 100644 index a1e00ef..0000000 --- a/automation/ansible/roles/cross-compilers/vars/Debian.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- -__cross_compilers_packages: - - gcc-5-aarch64-linux-gnu - - gcc-5-arm-linux-gnueabihf - - gcc-5-i686-linux-gnu - - gcc-5-powerpc64le-linux-gnu - - gcc-5-powerpc-linux-gnu - - gcc-5-s390x-linux-gnu - - gcc-aarch64-linux-gnu - - gcc-arm-linux-gnueabihf - - gcc-i686-linux-gnu - - gcc-powerpc64le-linux-gnu - - gcc-powerpc-linux-gnu - - gcc-s390x-linux-gnu diff --git a/automation/ansible/roles/cross-compilers/vars/RedHat.yml b/automation/ansible/roles/cross-compilers/vars/RedHat.yml index 75f383c..a4806c9 100644 --- a/automation/ansible/roles/cross-compilers/vars/RedHat.yml +++ b/automation/ansible/roles/cross-compilers/vars/RedHat.yml @@ -1,3 +1,2 @@ --- -# TODO -__cross_compilers_packages: +cross_compilers_packages: diff --git a/automation/ansible/roles/cross-compilers/vars/Suse.yml b/automation/ansible/roles/cross-compilers/vars/Suse.yml index 7701f01..9296fef 100644 --- a/automation/ansible/roles/cross-compilers/vars/Suse.yml +++ b/automation/ansible/roles/cross-compilers/vars/Suse.yml @@ -1,5 +1,5 @@ --- -__cross_compilers_packages: +cross_compilers_packages: - gcc-aarch64-linux-gnu - gcc-powerpc64le-linux-gnu - gcc-arm-linux-gnueabihf diff --git a/automation/ansible/roles/cross-compilers/vars/Ubuntu-18.yml b/automation/ansible/roles/cross-compilers/vars/Ubuntu-18.yml new file mode 100644 index 0000000..2466f2d --- /dev/null +++ b/automation/ansible/roles/cross-compilers/vars/Ubuntu-18.yml @@ -0,0 +1,14 @@ +--- +cross_compilers_packages: + - gcc-5-aarch64-linux-gnu + - gcc-5-arm-linux-gnueabihf + - gcc-5-i686-linux-gnu + - gcc-5-powerpc64le-linux-gnu + - gcc-5-powerpc-linux-gnu + - gcc-5-s390x-linux-gnu + - gcc-aarch64-linux-gnu + - gcc-arm-linux-gnueabihf + - gcc-i686-linux-gnu + - gcc-powerpc64le-linux-gnu + - gcc-powerpc-linux-gnu + - gcc-s390x-linux-gnu diff --git a/automation/ansible/roles/cross-compilers/vars/Ubuntu-22.yml b/automation/ansible/roles/cross-compilers/vars/Ubuntu-22.yml new file mode 100644 index 0000000..df8257a --- /dev/null +++ b/automation/ansible/roles/cross-compilers/vars/Ubuntu-22.yml @@ -0,0 +1,9 @@ +--- +cross_compilers_packages: + - gcc-aarch64-linux-gnu + - gcc-arm-linux-gnueabihf + - gcc-i686-linux-gnu + - gcc-powerpc64le-linux-gnu + - gcc-powerpc-linux-gnu + - gcc-riscv64-linux-gnu + - gcc-s390x-linux-gnu