---
 - hosts: pis

   tasks:
   - name: set authorized ssh keys
     authorized_key:
       user: ubuntu
       state: present
       key: "{{ lookup('file', '/home/sid/.ssh/pis_rsa.pub') }}"

   - name: apt install aptitude
     apt:
       name: aptitude
     become: True

   - name: apt update repo (valid for 1hr)
     apt: 
       update_cache: True
       cache_valid_time: 3600
     become: True

   - name: apt upgrade
     apt: 
       upgrade: yes
     become: True

   - name: apt autoremove
     apt: 
       autoclean: True
       autoremove: True
     become: True
