--- - name: Install microk8s hosts: "{{ my_hosts | d([]) }}" become: true tasks: - name: Install microk8s community.general.snap: classic: true name: microk8s - name: Add user to group microk8s ansible.builtin.user: name: "{{ lookup('env', 'USER') }}" groups: microk8s append: true