ansible/update.yml

23 lines
637 B
YAML

-
name: Update RaspberryPi's
hosts: all
become: yes # als root ausführen
tasks:
- name: Update apt-get repo and cache
register: apt-get-update
apt: update_cache=yes force_apt_get=yes cache_valid_time=3600
- name: Display the last line of the previous task to check the stats
debug:
msg: "{{apt-get-update.stdout_lines|last}}"
- name: Upgrade all apt packages
register: apt-get-upgrade
apt: upgrade=dist force_apt_get=yes
- name: Display the last line of the previous task to check the stats
debug:
msg: "{{apt-get-upgrade.stdout_lines|last}}"