ansible: Add Ubuntu 22.04 support to cross-compilers role
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 18 Jul 2022 20:32:11 +0000 (16:32 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Mon, 18 Jul 2022 20:42:57 +0000 (16:42 -0400)
Change-Id: Ibd6fb3eff444156a3d90cbff13b7ebffaa08805b
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
automation/ansible/roles/cross-compilers/tasks/main.yml
automation/ansible/roles/cross-compilers/vars/Alpine.yml
automation/ansible/roles/cross-compilers/vars/Debian.yml [deleted file]
automation/ansible/roles/cross-compilers/vars/RedHat.yml
automation/ansible/roles/cross-compilers/vars/Suse.yml
automation/ansible/roles/cross-compilers/vars/Ubuntu-18.yml [new file with mode: 0644]
automation/ansible/roles/cross-compilers/vars/Ubuntu-22.yml [new file with mode: 0644]

index 071456aab3ae0d12a4a2324cf93b1a8d81c77076..87bed057940acee0801093b0374b1a109655cf00 100644 (file)
@@ -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'
index 3528230aa0c5ed015c341695508d0af4f8a9cab7..bd8da823c894f58582da0a77f365b10629bce97e 100644 (file)
@@ -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 (file)
index a1e00ef..0000000
+++ /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
index 75f383c9db412e77e3959af5b3dc4e2a8c138dc7..a4806c9ef2abf50e5de59f976de5c80348be503d 100644 (file)
@@ -1,3 +1,2 @@
 ---
-# TODO
-__cross_compilers_packages:
+cross_compilers_packages:
index 7701f0127a4c77b07234b266870eadb3e9250f71..9296fef9082cf8c0eb71e1ec0b84e6b9383d75da 100644 (file)
@@ -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 (file)
index 0000000..2466f2d
--- /dev/null
@@ -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 (file)
index 0000000..df8257a
--- /dev/null
@@ -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
This page took 0.024987 seconds and 4 git commands to generate.