Browse Source

better code

master
parent
commit
6ebaeeee95
1 changed files with 11 additions and 6 deletions
  1. +11
    -6
      tasks/main.yml

+ 11
- 6
tasks/main.yml View File

@@ -1,14 +1,18 @@
--- ---


- name: Check if i386 is enabled
shell: dpkg --print-foreign-architectures | grep i386
- name: check if i386 is enabled
command: dpkg --print-foreign-architectures
register: result_i386_check register: result_i386_check
changed_when: result_i386_check.rc == 1
failed_when: result_i386_check.rc > 1
changed_when: not "i386" in result_i386_check.stdout_lines


- name: Enable i386 architecture
- name: enable i386 architecture
command: dpkg --add-architecture i386 command: dpkg --add-architecture i386
when: result_i386_check.rc == 1
when: result_i386_check.changed

- name: update apt cache after enabling i386
apt:
update_cache: yes
when: result_i386_check.changed


- name: install multiarch libraries - name: install multiarch libraries
apt: apt:
@@ -17,4 +21,5 @@
- lib32stdc++6 - lib32stdc++6
- lib32z1 - lib32z1
- lib32gcc1 - lib32gcc1
- libc6:i386
when: ansible_architecture == "x86_64" when: ansible_architecture == "x86_64"

Loading…
Cancel
Save