ansible: add librseq role
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 23 Feb 2024 19:50:00 +0000 (14:50 -0500)
committerMichael Jeanson <mjeanson@efficios.com>
Mon, 26 Feb 2024 18:51:11 +0000 (13:51 -0500)
Add the role to install a new optional build dependency
'libseccomp-dev'.

Change-Id: I470cdc1478109dd85f0b4f354e6d7fe27e0bd1ec
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
22 files changed:
automation/ansible/lava-all.yml
automation/ansible/node_all.yml
automation/ansible/node_amd64.yml
automation/ansible/node_arm64.yml
automation/ansible/node_armhf.yml
automation/ansible/node_el.yml
automation/ansible/node_i386.yml
automation/ansible/node_ppc64el.yml
automation/ansible/node_riscv64.yml
automation/ansible/node_sles.yml
automation/ansible/node_standalone.yml
automation/ansible/roles/librseq/tasks/main.yml [new file with mode: 0644]
automation/ansible/roles/librseq/tasks/setup-Alpine.yml [new file with mode: 0644]
automation/ansible/roles/librseq/tasks/setup-Debian.yml [new file with mode: 0644]
automation/ansible/roles/librseq/tasks/setup-RedHat.yml [new file with mode: 0644]
automation/ansible/roles/librseq/tasks/setup-Suse.yml [new file with mode: 0644]
automation/ansible/roles/librseq/vars/Alpine.yml [new file with mode: 0644]
automation/ansible/roles/librseq/vars/Debian.yml [new file with mode: 0644]
automation/ansible/roles/librseq/vars/RedHat.yml [new file with mode: 0644]
automation/ansible/roles/librseq/vars/Rocky.yml [new symlink]
automation/ansible/roles/librseq/vars/Suse.yml [new file with mode: 0644]
automation/ansible/site.yml

index eef624846e3bb454a2c9936fae962f395952bf28..874e615e43aea3866fcd89cb69a03f11c865d5b2 100644 (file)
@@ -2,6 +2,7 @@
   roles:
     - common
     - babeltrace
+    - librseq
     - liburcu
     - lttng-ust
     - lttng-tools
index 836971c6858104f6235c9222965df885c1860fe4..a4a6deae7fdeaefca73e7aaad9bb7e8a3eb320ea 100644 (file)
@@ -5,6 +5,7 @@
     - cross-compilers
     - compilers
     - babeltrace
+    - librseq
     - liburcu
     - lttng-ust
     - lttng-tools
index 2e7cc1ab94a2b1d3b04d6c46ee98ce78e0673e8e..cc394e5b3934225826d684c650dc61ffe6bd8d08 100644 (file)
@@ -6,6 +6,7 @@
     - compilers
     - babeltrace
     - binutils-gdb
+    - librseq
     - liburcu
     - lttng-ust
     - lttng-tools
index fd39716e650dd76b738b3ab784c455dd67b31d9c..8b561609934d79683f8b66a72564ab5e465ebd72 100644 (file)
@@ -3,6 +3,7 @@
     - common
     - common-node
     - babeltrace
+    - librseq
     - liburcu
     - lttng-ust
     - lttng-tools
index 2ae2ca407b7e3746c2f0f168aff90595e663a188..e3c6ad32616f2f87f319cb2ebd27e53759898484 100644 (file)
@@ -3,6 +3,7 @@
     - common
     - common-node
     - babeltrace
+    - librseq
     - liburcu
     - lttng-ust
     - lttng-tools
index 96b5f044fb0af45967f488f5ecc88a624acd66d2..06f8f7b247ff7220e867d41e48c6587280d81931 100644 (file)
@@ -3,6 +3,7 @@
     - common
     - common-node
     - babeltrace
+    - librseq
     - liburcu
     - lttng-ust
     - lttng-tools
index 1c68a058178949f5e28e77eddf4fe0baa29f62ad..3504a0a0295ba4f9b83726fbca0596cfd4a462ea 100644 (file)
@@ -3,6 +3,7 @@
     - common
     - common-node
     - babeltrace
+    - librseq
     - liburcu
     - lttng-ust
     - lttng-tools
index 62dc4d5b92d1b8dfca35e9d66f87f86bd234bdbf..8a106e596e44475b0f2b2b66f3d0f563d803fb13 100644 (file)
@@ -3,6 +3,7 @@
     - common
     - common-node
     - babeltrace
+    - librseq
     - liburcu
     - lttng-ust
     - lttng-tools
index 200fff7ad30eede41ea69b037b38dcd430c08045..a7c23f98f6db97c5fa93a26ff7592cf34d909927 100644 (file)
@@ -3,6 +3,7 @@
     - common
     - common-node
     - babeltrace
+    - librseq
     - liburcu
     - lttng-ust
     - lttng-tools
index 2c75e8897f237511cbcc59a4a726748890dce9aa..13d0e3e68786a020e2a11a0011a197b7800fa74f 100644 (file)
@@ -4,6 +4,7 @@
     - common-node
     - compilers
     - babeltrace
+    - librseq
     - liburcu
     - lttng-ust
     - lttng-tools
index 017037cf2b47adc9b9f61b8363aaff6539fc3309..c6af9b60e90fb775e537e977cf68543d14f6f204 100644 (file)
@@ -4,6 +4,7 @@
     - common-node
     - cross-compilers
     - babeltrace
+    - librseq
     - liburcu
     - lttng-ust
     - lttng-tools
diff --git a/automation/ansible/roles/librseq/tasks/main.yml b/automation/ansible/roles/librseq/tasks/main.yml
new file mode 100644 (file)
index 0000000..cd37dff
--- /dev/null
@@ -0,0 +1,21 @@
+---
+# Include variables and define needed variables.
+- name: Include OS-specific variables.
+  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 in ['RedHat', 'Rocky']
+
+- include: setup-Debian.yml
+  when: ansible_os_family == 'Debian'
+
+- include: setup-Alpine.yml
+  when: ansible_os_family == 'Alpine'
+
+- include: setup-Suse.yml
+  when: ansible_os_family == 'Suse'
diff --git a/automation/ansible/roles/librseq/tasks/setup-Alpine.yml b/automation/ansible/roles/librseq/tasks/setup-Alpine.yml
new file mode 100644 (file)
index 0000000..5a56175
--- /dev/null
@@ -0,0 +1,6 @@
+---
+- name: Update apk cache.
+  apk: update_cache=yes
+
+- name: Ensure librseq build dependencies are installed.
+  apk: "name={{ librseq_packages }} state=present"
diff --git a/automation/ansible/roles/librseq/tasks/setup-Debian.yml b/automation/ansible/roles/librseq/tasks/setup-Debian.yml
new file mode 100644 (file)
index 0000000..427b39e
--- /dev/null
@@ -0,0 +1,6 @@
+---
+- name: Update apt cache.
+  apt: update_cache=yes cache_valid_time=86400
+
+- name: Ensure librseq build dependencies are installed.
+  apt: "name={{ librseq_packages }} state=present"
diff --git a/automation/ansible/roles/librseq/tasks/setup-RedHat.yml b/automation/ansible/roles/librseq/tasks/setup-RedHat.yml
new file mode 100644 (file)
index 0000000..373fb5f
--- /dev/null
@@ -0,0 +1,5 @@
+---
+- name: Ensure librseq build dependencies are installed.
+  dnf:
+    name: "{{ librseq_packages }}"
+    state: installed
diff --git a/automation/ansible/roles/librseq/tasks/setup-Suse.yml b/automation/ansible/roles/librseq/tasks/setup-Suse.yml
new file mode 100644 (file)
index 0000000..770b578
--- /dev/null
@@ -0,0 +1,3 @@
+---
+- name: Ensure librseq build dependencies are installed.
+  zypper: "name={{ librseq_packages }} state=installed update_cache=yes"
diff --git a/automation/ansible/roles/librseq/vars/Alpine.yml b/automation/ansible/roles/librseq/vars/Alpine.yml
new file mode 100644 (file)
index 0000000..4e01b74
--- /dev/null
@@ -0,0 +1,2 @@
+---
+librseq_packages: []
diff --git a/automation/ansible/roles/librseq/vars/Debian.yml b/automation/ansible/roles/librseq/vars/Debian.yml
new file mode 100644 (file)
index 0000000..16ee740
--- /dev/null
@@ -0,0 +1,3 @@
+---
+librseq_packages:
+  - libseccomp-dev
diff --git a/automation/ansible/roles/librseq/vars/RedHat.yml b/automation/ansible/roles/librseq/vars/RedHat.yml
new file mode 100644 (file)
index 0000000..0cd8008
--- /dev/null
@@ -0,0 +1,3 @@
+---
+librseq_packages:
+  - libseccomp-devel
diff --git a/automation/ansible/roles/librseq/vars/Rocky.yml b/automation/ansible/roles/librseq/vars/Rocky.yml
new file mode 120000 (symlink)
index 0000000..f802000
--- /dev/null
@@ -0,0 +1 @@
+RedHat.yml
\ No newline at end of file
diff --git a/automation/ansible/roles/librseq/vars/Suse.yml b/automation/ansible/roles/librseq/vars/Suse.yml
new file mode 100644 (file)
index 0000000..0cd8008
--- /dev/null
@@ -0,0 +1,3 @@
+---
+librseq_packages:
+  - libseccomp-devel
index b113e9adc0143939c8c9285c0bca4e7597542606..0647675555310879df82dc846b0fd4658b499092 100644 (file)
@@ -22,6 +22,7 @@
     - compilers
     - babeltrace
     - binutils-gdb
+    - librseq
     - liburcu
     - lttng-ust
     - lttng-tools
This page took 0.029343 seconds and 4 git commands to generate.