#!/usr/bin/env ansible-playbook
---

- name: UPGRADE SERVERS
  hosts: all
  tasks:

    - name: apt-get dist-upgrade
      when: ansible_os_family == "Debian"
      apt:
        force_apt_get: true
        cache_valid_time: 3600
        upgrade: dist

    - name: yum upgrade
      when: ansible_os_family == "RedHat"
      yum:
        name: "*"
        state: latest

...
