Skip to content

Instantly share code, notes, and snippets.

@limejuny
Last active May 18, 2022 00:02
Show Gist options
  • Save limejuny/6aec7ead6785fc766507a4a56b354173 to your computer and use it in GitHub Desktop.
Save limejuny/6aec7ead6785fc766507a4a56b354173 to your computer and use it in GitHub Desktop.
Ansible: Update and upgrade apt packages
- hosts: all
gather_facts: no
tasks:
- name: Update and upgrade apt packages
become: true
apt:
upgrade: yes
update_cache: yes
register: aptout
- debug: msg="{{ aptout.stdout_lines }}"
when: aptout.stdout_lines is defined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment