apt: update_cache=yes cache_valid_time=86400
- name: Add snapshot soures for gcc-11-powerpc/riscv64
- when: ansible_distribution == 'Debian'
+ when: ansible_distribution == 'Debian' and ansible_distribution_major_version == '12'
block:
- ansible.builtin.copy:
dest: /etc/apt/preferences.d/snapshot.pref
update_cache: true
- name: Ensure cross-compilers packages are installed.
+ when: cross_compilers_install|default(true)
ansible.builtin.apt:
- name: "{{ cross_compilers_packages | difference(lookup('vars', 'cross_compilers_packages_exclude_{{ansible_userspace_architecture}}', default=[]))}}"
+ name: "{{ cross_compilers_packages | difference(lookup('vars', 'cross_compilers_packages_exclude_{{ansible_userspace_architecture|default(ansible_architecture)}}', default=[]))}}"
- name: Install legacy cross compilers
when: ansible_distribution == 'Debian' and ansible_architecture == 'x86_64' and compilers_legacy_install