- name: Update Debian systems with apt
- hosts: all
+ hosts: "{{ hosts | default('all') }}"
become: yes
gather_facts: false
tasks:
- name: Updating host using apt
apt:
- update_cache: yes
- upgrade: dist
- - name: Clean unwanted olderstuff
- apt:
+ autoclean: yes
autoremove: yes
+ install_recommends: no
+ name: "*"
purge: yes
+ state: latest
+ update_cache: yes