aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/roles/apt/tasks/main.yml
blob: 2d3160794a7a4398400c96a25924bf9130dd1fb6 (plain) (tree)
1
2
3
4
5
                                 


                            
                 


















                                 
- 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
        - Wait for connectivity
    
    - name: Clean up dependencies
      apt:
        autoremove: yes
        purge: yes
      notify:
        - Reboot
        - Wait for connectivity