aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/roles/apt/tasks/main.yml
blob: 6fd9e3ed81ddb56b5c48cd8b973a8ee6109b0d90 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
                                 


                            
                 







                            
                    



                          



                                 
                    


                          
- name: Check if apt is installed
  command: apt-get --version
  register: apt_version
  changed_when: no
  failed_when: no
  ignore_errors: yes

- when: apt_version.rc == 0
  become: yes
  block:
    - name: Upgrade packages
      apt:
        upgrade: full
      notify: reboot

    - name: Flush handlers
      meta: flush_handlers

    - name: Clean up dependencies
      apt:
        autoremove: yes
        purge: yes
      notify: reboot

    - name: Flush handlers
      meta: flush_handlers