ansible: Portability fixes for reusing modules / Debian trixie
[lttng-ci.git] / automation / ansible / roles / compilers / tasks / setup-Debian.yml
index ba847c55983b1edf0cf2e5c2c78d545cf7b29211..533c11ea2806f3e51a82c60560b990952bf1ff2b 100644 (file)
@@ -1,8 +1,15 @@
 ---
-- name: Add sources for gcc 4.8
-  when: ansible_distribution == 'Debian'
-  ansible.builtin.apt_repository:
-    repo: 'deb [trusted=yes] http://archive.debian.org/debian jessie main'
+- name: Install legacy compilers
+  block:
+   - name: Add sources for gcc 4.8
+     when: ansible_distribution == 'Debian'
+     ansible.builtin.apt_repository:
+       repo: 'deb [trusted=yes] http://archive.debian.org/debian jessie main'
+       state: "{{compilers_legacy_install|ternary('present', 'absent')}}"
+   - name: Install legacy compiler packages
+     when: compilers_legacy_install
+     ansible.builtin.apt:
+       name: "{{compilers_legacy_packages}}"
 
 - name: Update apt cache.
   apt: update_cache=yes cache_valid_time=86400
This page took 0.022699 seconds and 4 git commands to generate.