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

index 4595c120f1ea57645723fd18d828dd838b4ee6a6..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 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'
index c06b535ea2efb971608893b561419c57a503e228..c12ad7563438f86c1d09ab253284ef7c2ae68fa3 100644 (file)
@@ -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 (file)
index e9168eb..0000000
+++ /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
index bf746e2769310ed809d0bc428c36140fd2e415eb..45d52ee08c0ac429d1738c473e6387362cd4fb3e 100644 (file)
@@ -1,3 +1,2 @@
 ---
-# TODO
-__compilers_packages:
+compilers_packages:
index c06b535ea2efb971608893b561419c57a503e228..c12ad7563438f86c1d09ab253284ef7c2ae68fa3 100644 (file)
@@ -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 (file)
index 0000000..f88a27c
--- /dev/null
@@ -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 (file)
index 0000000..41813c4
--- /dev/null
@@ -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
This page took 0.025987 seconds and 4 git commands to generate.