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


                        

                      
                             
                    








                                      
 
                        

                      
                              
                  
                             
                                 


                                                        
                      
- name: Upgrade packages
  become: true
  ansible.builtin.apt:
    update_cache: true
    upgrade: dist
    install_recommends: false
  notify: apt_reboot

- name: Reboot if necessary
  ansible.builtin.meta: flush_handlers

- name: Clean up dependencies
  become: true
  ansible.builtin.apt:
    autoremove: true
    purge: true

- name: Install packages
  become: true
  ansible.builtin.apt:
    name: '{{ apt_packages }}'
    state: present
    install_recommends: false
  when: apt_packages | length > 0

- name: Configure unattended-upgrades
  ansible.builtin.include_tasks: unattended_upgrades.yml
  when: apt_unattended