- name: apt cleanup apt: clean: yes autoclean: yes - name: Reboot system command: /sbin/reboot async: 1 poll: 0 ignore_errors: true when: reboot_required.stdout == "yes"