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

index 3c7e0fd6747b08e02f58df2ee448f2b0d0c46cb5..809110a72d566b770ecb6cdb9b452102ea963b39 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 lttng_modules_packages.
-  set_fact:
-    lttng_modules_packages: "{{ __lttng_modules_packages | list }}"
-  when: lttng_modules_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 571d30080407daf96a6b813c0616f6ef1e96abba..69eb652d2ce7f67c76a2553f53a52d76ba6fadb1 100644 (file)
@@ -1,6 +1,4 @@
 ---
-__lttng_modules_packages:
-#  - kernel-wedge
+lttng_modules_packages:
   - libelf-dev
   - bc
-#  - gcc-4.9
diff --git a/automation/ansible/roles/lttng-modules/vars/Debian.yml b/automation/ansible/roles/lttng-modules/vars/Debian.yml
deleted file mode 100644 (file)
index 17208b7..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
----
-__lttng_modules_packages:
-  - kernel-wedge
-  - libelf-dev
-  - bc
-  - gcc-4.8
-  - gcc-5
-  - s3cmd
-  - u-boot-tools
-  - module-init-tools
-  - liblz4-tool
-  - dwarves
-  - dctrl-tools
-  - zstd
index a5ce33962eac423f06ce8183ab4f7adfa5273437..75a3db78ec13b2e3c2adce3a442648a0e43ab43c 100644 (file)
@@ -1,8 +1,4 @@
 ---
-__lttng_modules_packages:
-#  - kernel-wedge
+lttng_modules_packages:
   - elfutils-devel
   - bc
-#  - s3cmd
-#  - u-boot-tools
-#  - module-init-tools
index 7cd1bd11b20843c4f16207461d0c214775fa1915..bc2b5a8340cb3eb2e728a653a151508e5cf33c99 100644 (file)
@@ -1,6 +1,4 @@
 ---
-__lttng_modules_packages:
-#  - kernel-wedge
+lttng_modules_packages:
   - libelf-devel
   - bc
-#  - gcc-4.9
diff --git a/automation/ansible/roles/lttng-modules/vars/Ubuntu-18.yml b/automation/ansible/roles/lttng-modules/vars/Ubuntu-18.yml
new file mode 100644 (file)
index 0000000..4ba0692
--- /dev/null
@@ -0,0 +1,14 @@
+---
+lttng_modules_packages:
+  - bc
+  - dctrl-tools
+  - dwarves
+  - gcc-4.8
+  - gcc-5
+  - kernel-wedge
+  - libelf-dev
+  - liblz4-tool
+  - module-init-tools
+  - s3cmd
+  - u-boot-tools
+  - zstd
diff --git a/automation/ansible/roles/lttng-modules/vars/Ubuntu-22.yml b/automation/ansible/roles/lttng-modules/vars/Ubuntu-22.yml
new file mode 100644 (file)
index 0000000..766e482
--- /dev/null
@@ -0,0 +1,12 @@
+---
+lttng_modules_packages:
+  - bc
+  - dctrl-tools
+  - dwarves
+  - kernel-wedge
+  - kmod
+  - libelf-dev
+  - liblz4-tool
+  - s3cmd
+  - u-boot-tools
+  - zstd
This page took 0.025807 seconds and 4 git commands to generate.