From: Kienan Stewart Date: Tue, 24 Oct 2023 20:26:28 +0000 (-0400) Subject: ansible: Use 'compilers_legacy_install' to control legacy CC installation X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ece5559fe543a8702aaec6d71648a6c3b825e036;p=lttng-ci.git ansible: Use 'compilers_legacy_install' to control legacy CC installation Change-Id: Ib82813759364dd7227206f3dd4e6d8d95b720b2e --- diff --git a/automation/ansible/roles/cross-compilers/defaults/main.yml b/automation/ansible/roles/cross-compilers/defaults/main.yml new file mode 100644 index 0000000..d50918b --- /dev/null +++ b/automation/ansible/roles/cross-compilers/defaults/main.yml @@ -0,0 +1,3 @@ +--- +compilers_legacy_install: true +cross_compilers_debian_bookworm_snapshot: false diff --git a/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml b/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml index dfc2a71..a03cfa9 100644 --- a/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml +++ b/automation/ansible/roles/cross-compilers/tasks/setup-Debian.yml @@ -8,8 +8,10 @@ - ansible.builtin.copy: dest: /etc/apt/preferences.d/snapshot.pref content: "Package: *\nPin: origin \"snapshot.debian.org\"\nPin-Priority: 400\n" + when: cross_compilers_debian_bookworm_snapshot - ansible.builtin.apt_repository: repo: 'deb [check-valid-until=no] https://snapshot.debian.org/archive/debian/20230109T091852Z/ bookworm main' + state: "{{cross_compilers_debian_bookworm_snapshot|ternary('present', 'absent')}}" - ansible.builtin.apt: update_cache: true @@ -17,7 +19,7 @@ apt: "name={{ cross_compilers_packages }} state=present" - name: Install legacy cross compilers - when: ansible_distribution == 'Debian' and ansible_architecture == 'x86_64' + when: ansible_distribution == 'Debian' and ansible_architecture == 'x86_64' and compilers_legacy_install block: # This step needs to happen after the cross compiler packages are installed # so the libgcc cross libraries can be copied diff --git a/automation/ansible/roles/cross-compilers/vars/Debian.yml b/automation/ansible/roles/cross-compilers/vars/Debian.yml index a4bca80..32a8a35 100644 --- a/automation/ansible/roles/cross-compilers/vars/Debian.yml +++ b/automation/ansible/roles/cross-compilers/vars/Debian.yml @@ -23,3 +23,4 @@ cross_compilers_packages: # be fetched from a snapshot source instead - gcc-11-powerpc-linux-gnu - gcc-11-riscv64-linux-gnu +cross_compilers_debian_bookworm_snapshot: true