--- # tasks file for docker-host # OS-specific tasks - include_tasks: setup-Ubuntu.yml when: ansible_distribution == 'Ubuntu' # Setup tasks - name: Install docker module for python become: true pip: name: docker - name: Install docker compose become: true get_url: url: https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-linux-x86_64 dest: /usr/local/bin/docker-compose mode: 755 - name: Create docker group (for root-less docker) become: true group: name: docker state: present - name: Add user to the docker group (for root-less docker) become: true user: name: "{{ docker_user_username }}" groups: docker append: true - name: Install docker-compose module for python become: true pip: name: docker-compose - name: Create base docker folder for apps file: path: ~/docker state: directory become_user: "{{ docker_user_username }}"