aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roles/apt/tasks/main.yml
blob: dd56a4342d55f3b6a133af22f6a12ca4d32dfd6f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
- name: Find apt
  command: apt-get --version
  register: apt_version
  changed_when: no
  ignore_errors: yes

- when: apt_version.rc == 0
  become: yes
  block:
    - name: Upgrade packages
      apt:
        upgrade: full
      notify:
        - Reboot
        - Wait for connectivity
    
    - name: Clean up dependencies
      apt:
        autoremove: yes
        purge: yes
      notify:
        - Reboot
        - Wait for connectivity