From: Michael Jeanson Date: Tue, 1 Feb 2022 19:03:15 +0000 (-0500) Subject: ansible: add minimal i386 runtime libs on amd64 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=58ddf94bd7917db0ddc170efd4ec87ed04035434;p=lttng-ci.git ansible: add minimal i386 runtime libs on amd64 Change-Id: If219b7dba8c7a0abde8f302a3bef90057c3501c0 Signed-off-by: Michael Jeanson --- diff --git a/automation/ansible/node_amd64.yml b/automation/ansible/node_amd64.yml index f7ec70b..6ceb1b3 100644 --- a/automation/ansible/node_amd64.yml +++ b/automation/ansible/node_amd64.yml @@ -10,3 +10,4 @@ - lttng-tools - lttng-modules - lttng-analyses + - libs-i386 diff --git a/automation/ansible/roles/libs-i386/tasks/main.yml b/automation/ansible/roles/libs-i386/tasks/main.yml new file mode 100644 index 0000000..1853b68 --- /dev/null +++ b/automation/ansible/roles/libs-i386/tasks/main.yml @@ -0,0 +1,13 @@ +--- +# Include variables and define needed variables. +- name: Include OS-specific variables. + include_vars: "{{ ansible_os_family }}.yml" + +- name: Define libs_i386_packages. + set_fact: + libs_i386_packages: "{{ __libs_i386_packages | list }}" + when: libs_i386_packages is not defined + +# Setup/install tasks. +- include: setup-Debian.yml + when: ansible_os_family == 'Debian' diff --git a/automation/ansible/roles/libs-i386/tasks/setup-Debian.yml b/automation/ansible/roles/libs-i386/tasks/setup-Debian.yml new file mode 100644 index 0000000..e36836c --- /dev/null +++ b/automation/ansible/roles/libs-i386/tasks/setup-Debian.yml @@ -0,0 +1,17 @@ +--- +- name: Check if i386 foreign architecture is enabled in dpkg. + shell: dpkg --print-foreign-architectures | grep i386 + register: dpkg_i386_is_enabled + changed_when: dpkg_i386_is_enabled.rc == 1 + failed_when: dpkg_i386_is_enabled.rc > 1 + +- name: Add i386 foreign architecture to dpkg. + command: dpkg --add-architecture i386 + when: dpkg_i386_is_enabled.rc == 1 + +- name: Update apt cache. + apt: update_cache=yes + when: dpkg_i386_is_enabled.rc == 1 + +- name: Ensure libs-i386 packages are installed. + apt: "name={{ libs_i386_packages }} state=present" diff --git a/automation/ansible/roles/libs-i386/vars/Debian.yml b/automation/ansible/roles/libs-i386/vars/Debian.yml new file mode 100644 index 0000000..05d6e8c --- /dev/null +++ b/automation/ansible/roles/libs-i386/vars/Debian.yml @@ -0,0 +1,7 @@ +--- +__libs_i386_packages: + - liblzma5:i386 + - libnuma1:i386 + - libpopt0:i386 + - libxml2:i386 + - zlib1g:i386