---
- name: get facts and create os_type groups
hosts: all
gather_facts: True
tasks:
- group_by:
key: '{{ ansible_distribution }}'
- name: upgrade debian based machines
hosts: Ubuntu:FreeBSD
gather_facts: false
- include_role:
name: debian-update
vars:
apt_update_cache_valid_time: 0
when: ansible_distribution in ['Debian', 'Ubuntu']
name: freebsd-update
when: ansible_distribution == 'FreeBSD'