--- - hosts: localhost tasks: - apt: name: "{{ packages }}" vars: packages: - docker.io - docker-compose - python3-docker become: True