| 1 | --- |
| 2 | - name: Install legacy compilers |
| 3 | block: |
| 4 | - name: Add sources for gcc 4.8 |
| 5 | when: ansible_distribution == 'Debian' |
| 6 | ansible.builtin.apt_repository: |
| 7 | repo: 'deb [trusted=yes] http://archive.debian.org/debian jessie main' |
| 8 | state: "{{compilers_legacy_install|ternary('present', 'absent')}}" |
| 9 | - name: Install legacy compiler packages |
| 10 | when: compilers_legacy_install |
| 11 | ansible.builtin.apt: |
| 12 | name: "{{compilers_legacy_packages}}" |
| 13 | |
| 14 | - name: Update apt cache. |
| 15 | apt: update_cache=yes cache_valid_time=86400 |
| 16 | |
| 17 | - name: Ensure compilers packages are installed. |
| 18 | apt: "name={{ compilers_packages }} state=present" |