summaryrefslogtreecommitdiff
path: root/update_packages.yml
blob: f5a1b88a0c53673bf8c93a94efe375e9bfcd8599 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
---
- hosts: all
# strategy: free
  become: true
  tasks:

    - name: Install updates (apt)
      ansible.builtin.apt:
        name: "*"
        state: latest
        update_cache: yes
      when:
        - ansible_os_family == "Debian"

    - name: Install updates (pacman)
      community.general.pacman:
        upgrade: yes
        update_cache: yes
      when:
        - ansible_os_family == "Archlinux"