2 - name: Add LTTng-CI PPA
3 when: ansible_distribution == 'Ubuntu'
5 - name: LTTng-CI PPA | apt key
7 src: efficios_ubuntu_ci.gpg
8 dest: /etc/apt/trusted.gpg.d/efficios_ubuntu_ci.gpg
13 - name: LTTng-CI PPA | apt source
14 ansible.builtin.apt_repository:
15 repo: "deb [signed-by=/etc/apt/trusted.gpg.d/efficios_ubuntu_ci.gpg] http://ppa.launchpad.net/efficios/ci/ubuntu {{ ansible_distribution_release }} main"
17 filename: efficios-ubuntu-ci
19 - name: Update apt cache.
20 apt: update_cache=yes cache_valid_time=86400
22 - name: Ensure common packages are installed.
23 apt: "name={{ common_packages }} state=present"
25 - name: Install unattended upgrades
27 name: 'unattended-upgrades'
28 state: "{{(unattended_upgrades|bool)|ternary('present', 'absent')}}"
30 - name: Enable extra repos for unattended upgrades
32 dest: /etc/apt/apt.conf.d/51unattended_upgrades_extra_repos.conf
33 src: unattended_upgrades_extra_repos.conf.j2
36 - "${distro_id}:${distro_codename}-updates"
37 - "${distro_id}:${distro_codename}-backports"
39 - "LP-PPA-efficios-ci:${distro_codename}"
41 repos: "{{repos_base|union(lookup('vars', 'repos_' + ansible_distribution, default=[]))}}"
43 - name: Enable unattended upgrades
46 dest: /etc/apt/apt.conf.d/20auto-upgrades
47 content: "APT::Periodic::Update-Package-Lists \"1\";\nAPT::Periodic::Unattended-Upgrade \"1\";\n"
48 when: unattended_upgrades | bool
50 path: /etc/apt/apt.conf.d/20auto-upgrades
51 state: "{{(unattended_upgrades|bool)|ternary('file', 'absent')}}"