Skip to content
Snippets Groups Projects
update.yaml 467 B
Newer Older
Nathan Rodet's avatar
Nathan Rodet committed
---
# This playbook is used to update and upgrade apt packages on all instances

- name: "Apply updates and upgrades to all instances"
  become: yes
  become_method: sudo
  remote_user: root
  hosts: instances
  tasks:
    - name: "Update instances"
      register: output
      apt:
        update_cache: yes
        cache_valid_time: 86400
        upgrade: dist
        autoremove: yes

    - debug: msg="{{ output.stdout }}"
    - debug: msg="{{ output.stderr }}"