- name: install docker become: yes community.general.pacman: update_cache: yes name: - docker - docker-compose - name: "Enable service" become: yes ansible.builtin.systemd: name: docker state: started enabled: yes - name: add current user to docker group become: yes user: name: "{{ ansible_user_id }}" append: yes groups: docker