---
  - name: Update apt
    become: true
    apt:  update_cache=yes

  - name: Install system packages
    become: true
    apt:  pkg="{{ item }}" state=latest
    with_items:
      - apt-transport-https
      - curl
      - wget
      - build-essential
      - python-software-properties
      - pwgen
      - whois
---
  - debug:
      msg: "Running Ansible on {{ inventory_hostname }} with OS {{ ansible_distribution }} {{ ansible_distribution_release }} {{ ansible_distribution_version }}"

  - name: Update apt
    become: true
    apt:  update_cache=yes

  - name: Install system packages
    become: true
    apt:  pkg="{{ item }}" state=latest
    with_items:
      - apt-transport-https
      - curl
      - wget
      - build-essential
      - python-software-properties
      - pwgen
      - whois
Add useful debugging information to the first task of Ansible to indicate what it understands the OS and distro to be.
Add useful debugging information to the first task of Ansible to indicate what it understands the OS and distro to be.
