diff --git a/roles/mpstools/tasks/main.yml b/roles/mpstools/tasks/main.yml index 159c816c4e7d275cfb3bd66b168acd4be26e7209..6995d43d2a9169300efa7c1f10c4a67e6063af68 100644 --- a/roles/mpstools/tasks/main.yml +++ b/roles/mpstools/tasks/main.yml @@ -17,6 +17,10 @@ install_recommends: false force_apt_get: true +- name: Install 32-bit compatibility packages when on 64-bit system + import_tasks: x64-compat.yml + when: ansible_architecture != "i386" + - name: Install toolchain become: true unarchive: @@ -49,4 +53,3 @@ src: .sn dest: "/home/{{ vm_user }}" force: "{{ overwrite_config | default(false) }}" - diff --git a/roles/mpstools/tasks/x64-compat.yml b/roles/mpstools/tasks/x64-compat.yml new file mode 100644 index 0000000000000000000000000000000000000000..89c3fcd7cce44b9ddea2a922a3e617ea575db8a0 --- /dev/null +++ b/roles/mpstools/tasks/x64-compat.yml @@ -0,0 +1,34 @@ +--- +# roles/mpstools/x64-compat + +- name: Check if i386 packages are enabled + become: true + lineinfile: + dest: /var/lib/dpkg/arch + line: i386 + state: present + create: true + check_mode: yes + register: chk_i386 + +- name: Add i386 arch + become: true + command: dpkg --add-architecture i386 + when: chk_i386.changed + +- name: Update apt cache + become: true + apt: + update_cache: true + when: chk_i386.changed + +- name: Install required packages + become: true + apt: + name: + - libc6:i386 + - libstdc++6:i386 + - libx11-6:i386 + - libncurses5:i386 + install_recommends: false + state: present \ No newline at end of file